feat: publish

This commit is contained in:
louis 2024-03-27 16:54:11 +08:00
parent 4d20e39158
commit 18b776788d
2 changed files with 5 additions and 5 deletions

View File

@ -9,7 +9,7 @@ services:
target: production target: production
container_name: huaxin-base-frontend container_name: huaxin-base-frontend
ports: ports:
- '80:80' - '3001:3001'
env_file: env_file:
- .env - .env
- .env.production - .env.production

View File

@ -33,7 +33,7 @@ http {
#gzip on; #gzip on;
server { server {
listen 80; listen 3001;
absolute_redirect off; #取消绝对路径的重定向 absolute_redirect off; #取消绝对路径的重定向
sendfile on; sendfile on;
default_type application/octet-stream; default_type application/octet-stream;
@ -61,7 +61,7 @@ http {
# 后端服务 # 后端服务
location ^~ /api/ { location ^~ /api/ {
proxy_pass http://huaxin-admin-server:7001/api/; # 转发规则 proxy_pass http://huaxin-admin-server:8001/api/; # 转发规则
proxy_set_header Host $proxy_host; # 修改转发请求头,让目标应用可以受到真实的请求 proxy_set_header Host $proxy_host; # 修改转发请求头,让目标应用可以受到真实的请求
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@ -69,7 +69,7 @@ http {
# websocket服务 # websocket服务
location ^~ /ws-api/ { location ^~ /ws-api/ {
proxy_pass http://huaxin-admin-server:7002/ws-api/; proxy_pass http://huaxin-admin-server:8002/ws-api/;
proxy_read_timeout 300s; proxy_read_timeout 300s;
proxy_send_timeout 300s; proxy_send_timeout 300s;
@ -81,7 +81,7 @@ http {
} }
# 文件访问 # 文件访问
location ^~ /upload/ { location ^~ /upload/ {
proxy_pass http://huaxin-admin-server:7001/upload/; proxy_pass http://huaxin-admin-server:8001/upload/;
proxy_set_header Host $proxy_host; # 修改转发请求头,让目标应用可以受到真实的请求 proxy_set_header Host $proxy_host; # 修改转发请求头,让目标应用可以受到真实的请求
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;