Merge pull request #731 from supreme0597/fix/docker-uv-no-sync

chore: 优化 docker-compose 下 uv 启动参数,添加 --no-sync 阻止重复下载依赖
This commit is contained in:
Wenjie Zhang 2026-05-25 21:07:48 +08:00 committed by GitHub
commit b764f7001f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@ services:
environment:
<<: *api-worker-env
# endregion api_envs
command: uv run --no-dev uvicorn server.main:app --host 0.0.0.0 --port 5050
command: uv run --no-sync --no-dev uvicorn server.main:app --host 0.0.0.0 --port 5050
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:5050/api/system/health || exit 1"]
@ -82,7 +82,7 @@ services:
- .env.prod
environment:
<<: *api-worker-env
command: uv run --no-dev arq server.worker_main.WorkerSettings
command: uv run --no-sync --no-dev arq server.worker_main.WorkerSettings
restart: unless-stopped
depends_on:
postgres:

View File

@ -66,7 +66,7 @@ services:
environment:
<<: *api-worker-env
# endregion api_envs
command: uv run --no-dev uvicorn server.main:app --host 0.0.0.0 --port 5050 --reload --reload-dir /app/server --reload-dir /app/package
command: uv run --no-sync --no-dev uvicorn server.main:app --host 0.0.0.0 --port 5050 --reload --reload-dir /app/server --reload-dir /app/package
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:5050/api/system/health || exit 1"]