ForcePilot/docker/nginx/default.conf
Wenjie Zhang 38e389cf42 feat(deployment): 添加生产环境部署配置和文档
新增 docker-compose.prod.yml 生产环境配置
添加生产部署指南文档
更新 .gitignore 忽略 .env.prod 文件
优化 nginx 配置保持 /api/ 前缀
升级 Python 基础镜像到 3.12
添加 nginx 镜像到 Makefile
使用国内镜像源加速 pnpm 安装
2025-12-03 12:59:43 +08:00

25 lines
671 B
Plaintext

server {
listen 80;
server_name localhost;
# 增加客户端请求体大小限制
client_max_body_size 20M;
location / {
root /usr/share/nginx/html;
try_files $uri /index.html;
}
location /api/ {
proxy_pass http://api:5050/api/; # 保持 /api/ 前缀
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_read_timeout 600;
proxy_connect_timeout 600;
proxy_send_timeout 600;
}
}