fix: support local storage runtime and schedule logs

This commit is contained in:
Winnie
2026-08-14 15:06:36 +08:00
parent 65d14b8610
commit be475dd0d9
4 changed files with 64 additions and 11 deletions
+11 -3
View File
@@ -48,7 +48,6 @@ services:
volumes:
- ${PWD}:/app
- ./default.conf:/etc/nginx/conf.d/default.conf.template:ro
- ./scripts/nginx-entrypoint.sh:/usr/local/bin/model-platform-entrypoint.sh:ro
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1/ >/dev/null"]
interval: 10s
@@ -66,6 +65,13 @@ 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 local-FS volume: backend stores everything in S3 (S3_*).
environment:
@@ -95,7 +101,7 @@ services:
runtime:
condition: service_healthy
ports:
- 8891:8000
- 9121:8000
volumes:
- ${PWD}:/app
- ./data:/data
@@ -118,7 +124,7 @@ services:
max-file: "10"
restart: unless-stopped
ports:
- 8892:8000
- 9122:8000
cap_add:
- SYS_ADMIN
devices:
@@ -192,6 +198,8 @@ services:
S3_WORKSPACE_BUCKET: ${S3_WORKSPACE_BUCKET:-workspace}
S3_VERSION_BUCKET: ${S3_VERSION_BUCKET:-version}
S3_RUN_LOG_BUCKET: ${S3_RUN_LOG_BUCKET:-run-log}
# Backend's health endpoint already verifies MySQL; the scheduler only
# needs MySQL and Backend to be ready in either local or S3 mode.
READINESS_TARGETS: ${MYSQL_HOST:?MYSQL_HOST is required}:${MYSQL_PORT:-3306},backend:8000
depends_on:
backend: