将日志目录映射到宿主机./logs

This commit is contained in:
yml2213
2026-07-30 20:33:12 +08:00
parent 34a9122849
commit 1984bf6f7a
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -11,6 +11,7 @@ frontend/.env
backend/bin/ backend/bin/
backend/data/ backend/data/
backend/logs/ backend/logs/
/logs/
*.db *.db
# frontend # frontend
+2 -1
View File
@@ -36,9 +36,10 @@ services:
- OPEN_API_SECRET=${OPEN_API_SECRET} - OPEN_API_SECRET=${OPEN_API_SECRET}
- OPEN_SIGN_SKEW=${OPEN_SIGN_SKEW:-300} - OPEN_SIGN_SKEW=${OPEN_SIGN_SKEW:-300}
- OPEN_API_DEBUG=${OPEN_API_DEBUG:-false} - OPEN_API_DEBUG=${OPEN_API_DEBUG:-false}
- LOG_FILE=/data/app.log - LOG_FILE=${LOG_FILE:-logs/app.log}
volumes: volumes:
- backend-data:/data - backend-data:/data
- ./logs:/app/logs
restart: unless-stopped restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:8080/health"] test: ["CMD", "curl", "-fsS", "http://localhost:8080/health"]