feat: update Dockerfile for Python 3.12 and adjust docker-compose port mapping; add liveness and readiness endpoints to server

This commit is contained in:
2026-03-28 22:30:32 +00:00
parent 1fd2865c89
commit c22b402664
3 changed files with 5 additions and 5 deletions

View File

@@ -1,11 +1,9 @@
FROM python:3.11-slim
FROM python:3.12-slim
WORKDIR /app
COPY pyproject.toml .
RUN pip install --no-cache-dir -e .
COPY . .
RUN pip install --no-cache-dir .
EXPOSE 8000

View File

@@ -2,7 +2,7 @@ services:
nike:
build: .
ports:
- "${NIKE_PORT}:8000"
- "${NIKE_PORT}:${NIKE_PORT}"
env_file:
- .env
restart: unless-stopped

View File

@@ -819,11 +819,13 @@ async def api_run(body: _RunRequest):
# ── Health endpoints ──────────────────────────────────────
@dashboard.get("/live")
@dashboard.get("/live/")
async def liveness():
return JSONResponse({"status": "ok"})
@dashboard.get("/ready")
@dashboard.get("/ready/")
async def readiness():
db_check = db.check_connection()