添加docker构建配置

This commit is contained in:
2025-12-13 20:36:31 +08:00
parent 307573ba1b
commit b32e1d25d1
15 changed files with 995 additions and 842 deletions

32
nginx.conf Normal file
View File

@@ -0,0 +1,32 @@
server {
listen 8383;
server_name _;
# 前端静态文件
root /app/SmyWorkCollect-Frontend/build;
index index.html;
# 尽量命中静态资源
location / {
try_files $uri $uri/ /index.html;
}
# 反向代理到 Flask 后端
location /api/ {
proxy_pass http://127.0.0.1:5000;
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;
# 大文件与超时
client_max_body_size 5000M;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html { root /usr/share/nginx/html; }
}