This commit is contained in:
2026-01-05 20:56:49 +08:00
parent a9115c3b04
commit 361435cece
2 changed files with 31 additions and 41 deletions

View File

@@ -10,14 +10,8 @@ services:
networks:
- ${NETWORK_NAME:-proxy}
restart: ${RESTART_POLICY:-unless-stopped}
environment:
- NGINX_HOST=${NGINX_HOST:-localhost}
- NGINX_PORT=80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
# - ./ssl:/etc/nginx/ssl:ro # 如果需要SSL证书取消注释并配置证书文件
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/"]
test: ["CMD", "wget", "-qO-", "http://127.0.0.1/health"]
interval: 30s
timeout: 10s
retries: 3
@@ -35,4 +29,4 @@ services:
networks:
proxy:
external: ${EXTERNAL_NETWORK:-true}
name: ${NETWORK_NAME:-proxy}
name: ${NETWORK_NAME:-proxy}