mirror of
https://github.com/kennethreitz/kjvstudy.org.git
synced 2026-06-05 23:00:16 +00:00
0505a9e196
- Web service has healthcheck on /api/health - nginx depends on web being healthy before starting - Added curl to Dockerfile for healthcheck 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
33 lines
792 B
YAML
33 lines
792 B
YAML
services:
|
|
nginx:
|
|
image: nginx:alpine
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
|
- ./kjvstudy_org/static:/app/kjvstudy_org/static:ro
|
|
depends_on:
|
|
web:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
web:
|
|
build: .
|
|
expose:
|
|
- "8001"
|
|
volumes:
|
|
- .:/app
|
|
- /app/.venv
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
- PRELOAD_INTERLINEAR=true
|
|
- DISABLE_ANALYTICS=true
|
|
restart: unless-stopped
|
|
command: uv run uvicorn kjvstudy_org.server:app --host 0.0.0.0 --port 8001 --reload --reload-include '*.json'
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8001/api/health"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 10s
|