mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-05-07 07:22:43 +08:00
- 新增 nginx 配置模板,用于前端服务的反向代理 - 更新 Dockerfile,使用 pnpm 替代 npm 并添加 nginx 配置 - 添加启动脚本,实现后端健康检查和动态配置 nginx - 更新 .env.example,为后端主机添加注释说明 - 优化 docker-compose.yml,明确版本号并调整服务依赖
18 lines
429 B
Plaintext
18 lines
429 B
Plaintext
server {
|
|
listen 80;
|
|
resolver 127.0.0.11 valid=10s;
|
|
|
|
location / {
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /api/ {
|
|
proxy_pass http://backend:${BACKEND_PORT};
|
|
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;
|
|
}
|
|
} |