feat(deploy): 宿主机单 Nginx 方案、compose 覆盖与启动脚本
Made-with: Cursor
This commit is contained in:
20
docker-compose.host-nginx.yml
Normal file
20
docker-compose.host-nginx.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
# 与 docker-compose.yml 合并使用:宿主机 Nginx 独占 443 时,不要启动容器 yh_nginx。
|
||||
# 并为 api / web / admin 绑定本机回环端口,供宿主机 Nginx 反代(见 nginx/yuheng.host.conf)。
|
||||
#
|
||||
# docker compose -f docker-compose.yml -f docker-compose.host-nginx.yml up -d
|
||||
#
|
||||
# 容器内 Nginx(旧方案)需显式启用 profile:
|
||||
# docker compose --profile compose-internal-nginx up -d
|
||||
services:
|
||||
api:
|
||||
ports:
|
||||
- "127.0.0.1:8088:8088"
|
||||
web:
|
||||
ports:
|
||||
- "127.0.0.1:9080:80"
|
||||
admin:
|
||||
ports:
|
||||
- "127.0.0.1:9081:80"
|
||||
nginx:
|
||||
profiles:
|
||||
- compose-internal-nginx
|
||||
Reference in New Issue
Block a user