优化Docker配置:支持通过环境变量自定义宿主机与容器端口映射

This commit is contained in:
2026-01-28 13:59:37 +08:00
parent 61de3f44dc
commit c8a7ea5490
2 changed files with 4 additions and 2 deletions

View File

@@ -8,12 +8,12 @@ services:
container_name: bingpaper
restart: always
ports:
- "8080:8080"
- "${HOST_PORT:-8080}:${BINGPAPER_SERVER_PORT:-8080}"
volumes:
- ./data:/app/data
environment:
- TZ=Asia/Shanghai
- BINGPAPER_SERVER_PORT=8080
- BINGPAPER_SERVER_PORT=${BINGPAPER_SERVER_PORT:-8080}
- BINGPAPER_LOG_LEVEL=info
- BINGPAPER_API_MODE=local
- BINGPAPER_CRON_ENABLED=true