feat(项目部署): 前端工程部署

编译基础环境
This commit is contained in:
otto 2023-05-23 08:46:26 +08:00
parent e615781dc0
commit 4d2e4f7bbf
1 changed files with 9 additions and 1 deletions

View File

@ -3,7 +3,7 @@
# 使用说明,用来提示输入参数
usage() {
echo -e "\e[91m错误必须传入环境和方法两个参数 \e[0m"
echo "Usage: sh deploy.sh [test|prod] [port|base|build_modules|modules|stop|rm]"
echo "Usage: sh deploy.sh [test|prod] [port|build_base|base|build_modules|modules|stop|rm]"
exit 1
}
@ -25,6 +25,11 @@ port(){
service firewalld restart
}
# 编译基础环境(必须)
build_base(){
docker-compose build --no-cache gitlink-redis gitlink-nacos gitlink-nginx
}
# 启动基础环境(必须)
base(){
docker-compose up -d gitlink-redis gitlink-nacos gitlink-nginx
@ -75,6 +80,9 @@ case "$2" in
"base")
base
;;
"build_base")
build_base
;;
"build_modules")
build_modules
;;