From 40e744cb7c65bf89bc7b0feed71250835a1518a0 Mon Sep 17 00:00:00 2001 From: Oliver Vornheder Date: Thu, 26 Mar 2026 01:20:20 +0100 Subject: [PATCH] initial api --- Dockerfile | 9 +++++++++ app.py | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 Dockerfile create mode 100644 app.py diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e5fd32d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM python:3.11-slim + +WORKDIR /app + +COPY app.py . + +RUN pip install fastapi uvicorn + +CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/app.py b/app.py new file mode 100644 index 0000000..579bd53 --- /dev/null +++ b/app.py @@ -0,0 +1,32 @@ +from fastapi import FastAPI + +app = FastAPI() + +VERSION = "0.1.0" + +@app.get("/") +def root(): + return { + "service": "senaya-api", + "status": "running" + } + +@app.get("/health") +def health(): + return { + "status": "ok" + } + +@app.get("/version") +def version(): + return { + "version": VERSION + } + +@app.get("/info") +def info(): + return { + "name": "senaya-api", + "purpose": "base service slot for senaya infrastructure", + "version": VERSION + }