mirror of
https://git.fightbot.fun/hxuanyu/BingPaper.git
synced 2026-02-15 05:59:32 +08:00
优化Docker配置:支持通过环境变量自定义宿主机与容器端口映射
This commit is contained in:
@@ -101,3 +101,5 @@ BingPaper 支持通过配置文件(YAML)和环境变量进行配置。
|
||||
- `BINGPAPER_STORAGE_TYPE=s3`
|
||||
- `BINGPAPER_STORAGE_S3_BUCKET=my-images`
|
||||
- `BINGPAPER_ADMIN_PASSWORD_BCRYPT="$2a$10$..."`
|
||||
- `HOST_PORT=8080` (仅限 Docker Compose 部署,控制宿主机映射到外部的端口)
|
||||
- `BINGPAPER_SERVER_PORT=8080` (控制应用监听端口及容器内部端口)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user