fix(upload): P1-1 改 volume mount 持久化上传文件

This commit is contained in:
Simon
2026-06-14 21:55:57 +08:00
parent 4c65307e0c
commit c7eb87b24b
+10 -4
View File
@@ -100,6 +100,10 @@ services:
# 服务配置 # 服务配置
- BACKEND_HOST=0.0.0.0 - BACKEND_HOST=0.0.0.0
- BACKEND_PORT=8000 - BACKEND_PORT=8000
# 上传文件目录(持久化)
- UPLOAD_DIR=/app/uploads
volumes:
- backend-uploads:/app/uploads
depends_on: depends_on:
postgres: postgres:
condition: service_healthy condition: service_healthy
@@ -115,11 +119,11 @@ services:
networks: networks:
- it-desk-internal - it-desk-internal
healthcheck: healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"] test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health').read()"]
interval: 15s interval: 30s
timeout: 5s timeout: 10s
retries: 3 retries: 3
start_period: 30s start_period: 40s
logging: logging:
driver: "json-file" driver: "json-file"
options: options:
@@ -173,3 +177,5 @@ volumes:
name: wecom_it_postgres_data name: wecom_it_postgres_data
redis_data: redis_data:
name: wecom_it_redis_data name: wecom_it_redis_data
backend-uploads:
name: wecom_it_backend_uploads