update: docker-compose.yml

This commit is contained in:
tao.chen
2026-08-14 15:19:29 +08:00
parent be475dd0d9
commit e9a7e1a24e
+7 -14
View File
@@ -32,7 +32,7 @@ services:
max-size: "200m"
max-file: "10"
restart: unless-stopped
# Architecture §2.2: this is the only service exposed to the host. The
# Architecture §2.2: this is the only service exposed to the host. The
# default.conf file is mounted as a template; scripts/nginx-entrypoint.sh
# parses ${S3_ENDPOINT} and writes the rendered config to
# /etc/nginx/conf.d/default.conf before exec'ing nginx.
@@ -49,7 +49,7 @@ services:
- ${PWD}:/app
- ./default.conf:/etc/nginx/conf.d/default.conf.template:ro
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1/ >/dev/null"]
test: [ "CMD-SHELL", "wget -qO- http://127.0.0.1/ >/dev/null" ]
interval: 10s
timeout: 3s
retries: 12
@@ -65,14 +65,7 @@ services:
max-size: "200m"
max-file: "10"
restart: unless-stopped
# The source tree is bind-mounted for local development while /app/.venv
# is an anonymous Docker volume. Sync first so restarts never keep an
# older installed backend package.
command:
- sh
- -c
- uv sync --no-dev --no-editable --package backend && uv pip install --python /app/.venv/bin/python --reinstall --no-deps ./common ./backend && exec gunicorn --config backend/gunicorn.conf.py backend.main:app
# No host port: architecture §2.2 — only Nginx is externally reachable.
# No host port: architecture §2.2 — only Nginx is externally reachable.
# No local-FS volume: backend stores everything in S3 (S3_*).
environment:
DATABASE_URL: ${DATABASE_URL:?DATABASE_URL is required}
@@ -107,7 +100,7 @@ services:
- ./data:/data
- /app/.venv
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:8000/health/ready >/dev/null"]
test: [ "CMD-SHELL", "curl -fsS http://127.0.0.1:8000/health/ready >/dev/null" ]
interval: 10s
timeout: 5s
retries: 18
@@ -182,8 +175,8 @@ services:
max-size: "200m"
max-file: "10"
restart: unless-stopped
# No host port: architecture §2.2 — only Nginx is externally reachable.
# No local-FS volume: schedule executes nodes via tempfile.TemporaryDirectory
# No host port: architecture §2.2 — only Nginx is externally reachable.
# No local-FS volume: schedule executes nodes via tempfile.TemporaryDirectory
# under Python's default temp dir (cleaned per-run); artifacts live in S3.
environment:
DATABASE_URL: ${DATABASE_URL:?DATABASE_URL is required}
@@ -209,7 +202,7 @@ services:
- ./data:/data
- /app/.venv
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:8000/health/ready >/dev/null"]
test: [ "CMD-SHELL", "curl -fsS http://127.0.0.1:8000/health/ready >/dev/null" ]
interval: 10s
timeout: 5s
retries: 18