diff --git a/Dockerfile b/Dockerfile index 97005013..c1c42497 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ ENV LANG="C.UTF-8" \ PUID=0 \ PGID=0 \ UMASK=000 \ + NGINX_PORT=3000 \ CONFIG_DIR="/config" \ API_TOKEN="moviepilot" \ AUTH_SITE="iyuu" \ diff --git a/README.md b/README.md index b41148aa..c4edbd92 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ docker pull jxxghp/moviepilot:latest ### 1. **基础设置** -- **HOST:** 监听地址,默认`0.0.0.0`,如需支持ipv6则需改为`::` +- **NGINX_PORT:** WEB服务端口,默认`3000`,可自行修改,但不能为`3001` - **SUPERUSER:** 超级管理员用户名,默认`admin`,安装后使用该用户登录后台管理界面 - **SUPERUSER_PASSWORD:** 超级管理员初始密码,默认`password`,建议修改为复杂密码 - **API_TOKEN:** API密钥,默认`moviepilot`,在媒体服务器Webhook、微信回调等地址配置中需要加上`?token=`该值,建议修改为复杂字符串 diff --git a/app/core/config.py b/app/core/config.py index cf1efe95..4778b78a 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -17,7 +17,7 @@ class Settings(BaseSettings): ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 24 * 8 # 时区 TZ: str = "Asia/Shanghai" - # 监听地址,ipv6改为:: + # API监听地址 HOST: str = "0.0.0.0" # API监听端口 PORT: int = 3001 diff --git a/nginx.conf b/nginx.conf index 590f94bf..5e19015a 100644 --- a/nginx.conf +++ b/nginx.conf @@ -22,7 +22,7 @@ http { include /etc/nginx/mime.types; default_type application/octet-stream; - listen 3000; + listen [::]:${NGINX_PORT}; server_name moviepilot; location / {