fix(nginx): 启动时从 resolv.conf 注入 resolver + tpl 生成配置,修复 Podman host not found api
Made-with: Cursor
This commit is contained in:
@@ -56,11 +56,12 @@ services:
|
||||
container_name: yh_nginx
|
||||
ports:
|
||||
- "443:443"
|
||||
# Podman 无 Docker 的 127.0.0.11:勿在 nginx 里用 resolver+变量 proxy_pass。先等 web/admin/api 可解析再启动 nginx。
|
||||
# 启动脚本:等上游 → 从 resolv.conf 注入 resolver → 生成 conf.d(变量 proxy_pass),避免 Podman host not found
|
||||
entrypoint: ["/bin/sh", "/nginx-entrypoint-wait-dns.sh"]
|
||||
volumes:
|
||||
- ./scripts/nginx-entrypoint-wait-dns.sh:/nginx-entrypoint-wait-dns.sh:ro
|
||||
- ./nginx/yuheng.docker.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
- ./nginx/yuheng.docker.conf.tpl:/yuheng.docker.conf.tpl:ro
|
||||
- ./nginx/runtime-confd:/etc/nginx/conf.d
|
||||
- /etc/ssl/yh_web/yuheng.yuxindazhineng.com:/etc/ssl/yh_web/yuheng.yuxindazhineng.com:ro
|
||||
depends_on:
|
||||
- api
|
||||
|
||||
Reference in New Issue
Block a user