chenxiaoxiang месяцев назад: 9
Родитель
Сommit
6539d4c845
2 измененных файлов с 18 добавлено и 1 удалено
  1. 10 1
      docker/docker-compose.yml
  2. 8 0
      docker/run.sh

+ 10 - 1
docker/docker-compose.yml

@@ -90,4 +90,13 @@ services:
90
       - SPRING_PROFILES_ACTIVE=${PROFILE:-prod}
90
       - SPRING_PROFILES_ACTIVE=${PROFILE:-prod}
91
       - TZ=Asia/Shanghai
91
       - TZ=Asia/Shanghai
92
     ports:
92
     ports:
93
-      - "39212:9212"
93
+      - "39219:9219"
94
+
95
+
96
+  airport-web:
97
+    container_name: airport-web
98
+    build:
99
+      context: ./web
100
+      dockerfile: Dockerfile
101
+    ports:
102
+      - "38081:80"

+ 8 - 0
docker/run.sh

@@ -25,6 +25,7 @@ usage() {
25
     echo "  gen      - 代码生成服务"
25
     echo "  gen      - 代码生成服务"
26
     echo "  monitor   - 监控中心"
26
     echo "  monitor   - 监控中心"
27
     echo "  exam   - 考试服务"
27
     echo "  exam   - 考试服务"
28
+    echo "  airportWeb   - 管理前端"
28
     echo -e "\n${YELLOW}管理命令:${NC}"
29
     echo -e "\n${YELLOW}管理命令:${NC}"
29
     echo "  stopAll   - 停止所有服务"
30
     echo "  stopAll   - 停止所有服务"
30
     echo "  rmAll     - 删除所有容器"
31
     echo "  rmAll     - 删除所有容器"
@@ -71,6 +72,11 @@ exam() {
71
     restart_service "airport-exam" "$1" "考试服务"
72
     restart_service "airport-exam" "$1" "考试服务"
72
 }
73
 }
73
 
74
 
75
+# 管理前端
76
+airportWeb() {
77
+    restart_service "airport-web" "$1" "管理前端"
78
+}
79
+
74
 # 核心重启逻辑
80
 # 核心重启逻辑
75
 restart_service() {
81
 restart_service() {
76
     local service=$1
82
     local service=$1
@@ -114,6 +120,7 @@ restart() {
114
         "gen") gen "$2" ;;
120
         "gen") gen "$2" ;;
115
         "monitor") monitor "$2" ;;
121
         "monitor") monitor "$2" ;;
116
         "exam") exam "$2" ;;
122
         "exam") exam "$2" ;;
123
+        "airportWeb") airportWeb "$2" ;;
117
         *) echo -e "${RED}未知模块: $1${NC}"; usage ;;
124
         *) echo -e "${RED}未知模块: $1${NC}"; usage ;;
118
     esac
125
     esac
119
 }
126
 }
@@ -128,6 +135,7 @@ case "$1" in
128
     "gen") gen "$2" ;;
135
     "gen") gen "$2" ;;
129
     "exam") exam "$2" ;;
136
     "exam") exam "$2" ;;
130
     "monitor") monitor "$2" ;;
137
     "monitor") monitor "$2" ;;
138
+    "airportWeb") airportWeb "$2" ;;
131
     "stopAll") stopAll ;;
139
     "stopAll") stopAll ;;
132
     "rmAll") rmAll ;;
140
     "rmAll") rmAll ;;
133
     "restart") restart "$2" "$3" ;;
141
     "restart") restart "$2" "$3" ;;