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:
@@ -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
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ services:
|
||||
nike:
|
||||
build: .
|
||||
ports:
|
||||
- "${NIKE_PORT}:8000"
|
||||
- "${NIKE_PORT}:${NIKE_PORT}"
|
||||
env_file:
|
||||
- .env
|
||||
restart: unless-stopped
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user