Update Docker Compose configuration to support customizable Nginx ports

- Modify `docker-compose.yaml` to use environment variables for HTTP and HTTPS port mappings, allowing flexibility in port configuration.
- Enhance `README.md` with instructions for using non-standard HTTPS ports, including examples for remote development setups.
This commit is contained in:
Xin Wang
2026-07-09 22:38:42 +08:00
parent fa6693ce46
commit d857401ef3
2 changed files with 26 additions and 5 deletions

View File

@@ -142,8 +142,8 @@ services:
image: nginx:alpine
profiles: ["tls"]
ports:
- "80:80"
- "443:443"
- "${NGINX_HTTP_PORT:-80}:80"
- "${NGINX_HTTPS_PORT:-443}:443"
volumes:
# 整份配置当作 nginx.conf 加载(容器内 proxy_pass 用服务名 api/ui)
- ./deploy/nginx/ai-video.docker.conf:/etc/nginx/nginx.conf:ro
@@ -161,8 +161,8 @@ services:
image: nginx:alpine
profiles: ["remote-dev"]
ports:
- "80:80"
- "443:443"
- "${NGINX_HTTP_PORT:-80}:80"
- "${NGINX_HTTPS_PORT:-443}:443"
volumes:
- ./deploy/nginx/ai-video.remote-dev.conf:/etc/nginx/nginx.conf:ro
- ./deploy/certs:/etc/nginx/certs:ro