Files
ai-contract-platform/deploy/web-gateway.conf
T
yuqei b7073d9c5b feat: enhance production deployment configuration and documentation
- Update .env.example with production-ready environment variables
- Add frontend Aliyun deployment configuration with nginx gateway
- Refactor docker-compose.server.yml for external services
- Add comprehensive deployment guide (docs/DEPLOYMENT.md)
- Enhance troubleshooting documentation with Git Bash path issues
- Add deployment scripts (build-frontend.sh, deploy-frontend.sh)
- Add deploy directory with docker-compose and nginx config
- Update .gitignore to exclude temporary directories

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-18 22:27:00 +08:00

72 lines
2.2 KiB
Plaintext

upstream ai_contract_web {
server ai-contract-web:3000;
}
upstream ai_contract_api {
server 10.20.0.11:18083;
}
server {
listen 80;
server_name contact.yuqei.com;
charset utf-8;
client_max_body_size 100m;
location = /healthz {
access_log off;
return 200 'ok';
add_header Content-Type text/plain;
}
location /api/ {
proxy_pass http://ai_contract_api/api/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_buffering off;
proxy_connect_timeout 10s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
}
location = /health {
proxy_pass http://ai_contract_api/health;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /_next/static/ {
proxy_pass http://ai_contract_web;
proxy_http_version 1.1;
proxy_set_header Host $host;
add_header Cache-Control "public, max-age=31536000, immutable" always;
}
location / {
proxy_pass http://ai_contract_web;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_hide_header Cache-Control;
proxy_hide_header Expires;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate" always;
add_header Pragma "no-cache" always;
add_header Expires "0" always;
proxy_connect_timeout 10s;
proxy_send_timeout 120s;
proxy_read_timeout 120s;
}
}