build: 项目搭建完成

This commit is contained in:
louis 2024-02-28 11:54:30 +08:00
parent 14d80646e8
commit c84eb04d59
3 changed files with 7 additions and 14 deletions

View File

@ -3,11 +3,4 @@
# 拉取最新的代码 # 拉取最新的代码
git pull git pull
# 关闭并删除 docker-compose 启动的服务 docker compose --env-file .env --env-file .env.production up --build
docker-compose down
# 删除指定的 Docker 镜像
docker rmi huaxin_base_frontend-huaxin-base-frontend
# 使用 docker-compose 启动服务
docker-compose up -d

View File

@ -14,8 +14,8 @@ services:
- .env - .env
- .env.production - .env.production
networks: networks:
- nest_front_net - huaxin_front_net
networks: networks:
nest_front_net: huaxin_front_net:
external: external:
name: nest_admin_net name: huaxin_admin_net

View File

@ -61,7 +61,7 @@ http {
# 后端服务 # 后端服务
location ^~ /api/ { 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 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://nest-admin-server:7002/ws-api/; proxy_pass http://huaxin-admin-server:7002/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://nest-admin-server:7001/upload/; proxy_pass http://huaxin-admin-server:7001/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;