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
|
WORKDIR /app
|
||||||
|
|
||||||
COPY pyproject.toml .
|
|
||||||
RUN pip install --no-cache-dir -e .
|
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN pip install --no-cache-dir .
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ services:
|
|||||||
nike:
|
nike:
|
||||||
build: .
|
build: .
|
||||||
ports:
|
ports:
|
||||||
- "${NIKE_PORT}:8000"
|
- "${NIKE_PORT}:${NIKE_PORT}"
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|||||||
@@ -819,11 +819,13 @@ async def api_run(body: _RunRequest):
|
|||||||
# ── Health endpoints ──────────────────────────────────────
|
# ── Health endpoints ──────────────────────────────────────
|
||||||
|
|
||||||
|
|
||||||
|
@dashboard.get("/live")
|
||||||
@dashboard.get("/live/")
|
@dashboard.get("/live/")
|
||||||
async def liveness():
|
async def liveness():
|
||||||
return JSONResponse({"status": "ok"})
|
return JSONResponse({"status": "ok"})
|
||||||
|
|
||||||
|
|
||||||
|
@dashboard.get("/ready")
|
||||||
@dashboard.get("/ready/")
|
@dashboard.get("/ready/")
|
||||||
async def readiness():
|
async def readiness():
|
||||||
db_check = db.check_connection()
|
db_check = db.check_connection()
|
||||||
|
|||||||
Reference in New Issue
Block a user