release: freeze 2026-10-15 validated release baseline
CI/CD Pipeline / UI Contracts (source-structure gates) (push) Canceled after 0s
CI/CD Pipeline / E2E (live stack) (push) Canceled after 0s
CI/CD Pipeline / Backend Build & Test (push) Canceled after 0s
CI/CD Pipeline / Admin Web Build (push) Canceled after 0s
CI/CD Pipeline / Mini Program Compile Check (push) Canceled after 0s
CI/CD Pipeline / Migration Validation (push) Canceled after 0s
CI/CD Pipeline / Test Shell Guard (Phase 23 Gate) (push) Canceled after 0s
CI/CD Pipeline / UI Contracts (source-structure gates) (push) Canceled after 0s
CI/CD Pipeline / E2E (live stack) (push) Canceled after 0s
CI/CD Pipeline / Backend Build & Test (push) Canceled after 0s
CI/CD Pipeline / Admin Web Build (push) Canceled after 0s
CI/CD Pipeline / Mini Program Compile Check (push) Canceled after 0s
CI/CD Pipeline / Migration Validation (push) Canceled after 0s
CI/CD Pipeline / Test Shell Guard (Phase 23 Gate) (push) Canceled after 0s
This commit is contained in:
+12
-11
@@ -34,18 +34,19 @@ http {
|
||||
limit_req_zone $binary_remote_addr zone=auth:10m rate=5r/s;
|
||||
limit_req_zone $binary_remote_addr zone=upload:10m rate=10r/s;
|
||||
|
||||
upstream backend {
|
||||
server backend:8080;
|
||||
}
|
||||
|
||||
upstream admin_web {
|
||||
server admin-web:80;
|
||||
}
|
||||
# Docker Compose 内置 DNS resolver —— 让 proxy_pass 中的主机名延迟解析(请求时才查),
|
||||
# 避免 nginx 启动时 backend/admin-web 容器的 DNS 还没注册好就 [emerg] 退出。
|
||||
resolver 127.0.0.11 valid=30s ipv6=off;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
# upstream 变量(必须在 server 块内,不能在 http 顶层)
|
||||
# 使用固定容器名,避免后端因跨 compose 网络重连后丢失 service alias。
|
||||
set $backend_upstream "http://danyang-match-backend:8080";
|
||||
set $admin_upstream "http://admin-web:80";
|
||||
|
||||
# Health check for nginx itself
|
||||
location /nginx-health {
|
||||
return 200 'ok';
|
||||
@@ -55,7 +56,7 @@ http {
|
||||
# API proxy
|
||||
location /api/ {
|
||||
limit_req zone=api burst=50 nodelay;
|
||||
proxy_pass http://backend;
|
||||
proxy_pass $backend_upstream;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
@@ -69,7 +70,7 @@ http {
|
||||
|
||||
# WebSocket proxy
|
||||
location /ws/ {
|
||||
proxy_pass http://backend;
|
||||
proxy_pass $backend_upstream;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
@@ -83,7 +84,7 @@ http {
|
||||
# Auth endpoints - stricter rate limit
|
||||
location /api/v1/auth/ {
|
||||
limit_req zone=auth burst=10 nodelay;
|
||||
proxy_pass http://backend;
|
||||
proxy_pass $backend_upstream;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
@@ -98,7 +99,7 @@ http {
|
||||
return 301 /admin/;
|
||||
}
|
||||
location /admin/ {
|
||||
proxy_pass http://admin_web;
|
||||
proxy_pass $admin_upstream;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
Reference in New Issue
Block a user