From 18b776788dd42be7c0e5b4f98005d28c484d10e0 Mon Sep 17 00:00:00 2001 From: louis <869322496@qq.com> Date: Wed, 27 Mar 2024 16:54:11 +0800 Subject: [PATCH] feat: publish --- docker-compose.yml | 2 +- nginx.conf | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1f8774c..a5d9b9f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: target: production container_name: huaxin-base-frontend ports: - - '80:80' + - '3001:3001' env_file: - .env - .env.production diff --git a/nginx.conf b/nginx.conf index 1dcc699..d473b74 100644 --- a/nginx.conf +++ b/nginx.conf @@ -33,7 +33,7 @@ http { #gzip on; server { - listen 80; + listen 3001; absolute_redirect off; #取消绝对路径的重定向 sendfile on; default_type application/octet-stream; @@ -61,7 +61,7 @@ http { # 后端服务 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 X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -69,7 +69,7 @@ http { # websocket服务 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_send_timeout 300s; @@ -81,7 +81,7 @@ http { } # 文件访问 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 X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;