feat: replace Docker healthcheck with curl
This commit is contained in:
parent
1b3acce7e9
commit
9e5066cf1d
2 changed files with 4 additions and 1 deletions
|
|
@ -1,5 +1,8 @@
|
|||
FROM python:3.13-slim
|
||||
|
||||
# Install curl for healthcheck
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install uv for fast dependency management
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ services:
|
|||
environment:
|
||||
- DATA_DIR=/data
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import httpx; r=httpx.get('http://localhost:8000/api/health'); exit(0 if r.status_code==200 else 1)"]
|
||||
test: ["CMD", "curl", "-sf", "http://localhost:8000/api/health"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
|
|
|||
Loading…
Reference in a new issue