fix(deploy): 修复 Docker 部署两个问题

1. 后端 Dockerfile 开启 CGO(go-sqlite3 依赖),安装 gcc/musl-dev
2. nginx 添加 /auth/ 反向代理,修复注册登录 405 错误
This commit is contained in:
2026-05-24 14:33:45 +08:00
parent e373f39667
commit 6a88ec0d46
3 changed files with 12 additions and 3 deletions
+9
View File
@@ -18,4 +18,13 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# 反向代理 /auth 到后端服务
location /auth/ {
proxy_pass http://backend:8080;
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;
}
}