fix(upload): P1-1 改 volume mount 持久化上传文件
This commit is contained in:
+10
-4
@@ -100,6 +100,10 @@ services:
|
||||
# 服务配置
|
||||
- BACKEND_HOST=0.0.0.0
|
||||
- BACKEND_PORT=8000
|
||||
# 上传文件目录(持久化)
|
||||
- UPLOAD_DIR=/app/uploads
|
||||
volumes:
|
||||
- backend-uploads:/app/uploads
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
@@ -115,11 +119,11 @@ services:
|
||||
networks:
|
||||
- it-desk-internal
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health').read()"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
start_period: 40s
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
@@ -173,3 +177,5 @@ volumes:
|
||||
name: wecom_it_postgres_data
|
||||
redis_data:
|
||||
name: wecom_it_redis_data
|
||||
backend-uploads:
|
||||
name: wecom_it_backend_uploads
|
||||
|
||||
Reference in New Issue
Block a user