生产docker部署

This commit is contained in:
andy
2026-06-30 10:57:21 +08:00
parent 898a1e1577
commit 46a8bf3c07
6 changed files with 152 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
server {
listen 10086;
server_name _;
root /usr/share/nginx/html;
index index.html;
client_max_body_size 20m;
gzip on;
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
location = /index.html {
add_header Cache-Control "no-cache";
}
location /assets/ {
expires 30d;
add_header Cache-Control "public, immutable";
try_files $uri =404;
}
location /auth/ {
proxy_pass ${BACKEND_GATEWAY}/auth/;
proxy_http_version 1.1;
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;
}
location /admin/ {
proxy_pass ${BACKEND_GATEWAY}/admin/;
proxy_http_version 1.1;
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;
}
location /hotelStaff/ {
proxy_pass ${BACKEND_GATEWAY}/hotelStaff/;
proxy_http_version 1.1;
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;
}
location /hotelBiz/ {
proxy_pass ${BACKEND_GATEWAY}/hotelBiz/;
proxy_http_version 1.1;
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;
}
location / {
try_files $uri $uri/ /index.html;
}
}