diff --git a/.gitignore b/.gitignore index cc7efa1..a177545 100644 --- a/.gitignore +++ b/.gitignore @@ -195,6 +195,8 @@ Thumbs.db # Env .env +.env.* +!.env.example # Deployment docs (contain credentials, not for git) *部署交接文档.md diff --git a/frontend/nginx.conf b/frontend/nginx.conf index 3ea7914..8e3b95c 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -5,22 +5,13 @@ server { root /usr/share/nginx/html; index index.html; - # Vue app + # SPA fallback location / { try_files $uri $uri/ /index.html; } - # API proxy - location /api/ { - proxy_pass http://backend:8000; - 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; - } - + # Health check location /health { - proxy_pass http://backend:8000; - proxy_set_header Host $host; + return 200 "ok"; } }