diff --git a/deploy.sh b/deploy.sh index 21b1986..698d8d5 100644 --- a/deploy.sh +++ b/deploy.sh @@ -3,11 +3,4 @@ # 拉取最新的代码 git pull -# 关闭并删除 docker-compose 启动的服务 -docker-compose down - -# 删除指定的 Docker 镜像 -docker rmi huaxin_base_frontend-huaxin-base-frontend - -# 使用 docker-compose 启动服务 -docker-compose up -d \ No newline at end of file +docker compose --env-file .env --env-file .env.production up --build \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 5c2b893..daed299 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,8 +14,8 @@ services: - .env - .env.production networks: - - nest_front_net + - huaxin_front_net networks: - nest_front_net: + huaxin_front_net: external: - name: nest_admin_net + name: huaxin_admin_net diff --git a/nginx.conf b/nginx.conf index 301cf4d..1f36433 100644 --- a/nginx.conf +++ b/nginx.conf @@ -61,7 +61,7 @@ http { # 后端服务 location ^~ /api/ { - proxy_pass http://nest-admin-server:7001/api/; # 转发规则 + proxy_pass http://huaxin-admin-server:7001/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://nest-admin-server:7002/ws-api/; + proxy_pass http://huaxin-admin-server:7002/ws-api/; proxy_read_timeout 300s; proxy_send_timeout 300s; @@ -81,7 +81,7 @@ http { } # 文件访问 location ^~ /upload/ { - proxy_pass http://nest-admin-server:7001/upload/; + proxy_pass http://huaxin-admin-server:7001/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;