initial api

This commit is contained in:
Oliver Vornheder 2026-03-26 01:20:20 +01:00
commit 40e744cb7c
2 changed files with 41 additions and 0 deletions

9
Dockerfile Normal file
View file

@ -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"]

32
app.py Normal file
View file

@ -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
}