提交 975924fe authored 作者: yoyoyo's avatar yoyoyo

1

上级 9ba5b5e0
...@@ -3,14 +3,19 @@ ...@@ -3,14 +3,19 @@
install_dir="/wwwroot" install_dir="/wwwroot"
production_run_dir="$install_dir/production-run"
production_run_repo="git.wkwork.xyz/tiktok/production-run.git"
production_run_dir="$install_dir/install_projects"
production_run_repo="http://git.wkwork.xyz/root/install_projects.git"
production_server_dir="$install_dir/production-server-config" production_server_dir="$install_dir/production-server-config"
production_server_repo="git.wkwork.xyz/tiktok/production-server-config.git" production_server_repo="git.wkwork.xyz/tiktok/production-server-config.git"
production_install_dir="$production_run_dir/production"
projects=( projects=(
# 项目名 项目仓库 项目保存目录 # 项目名 项目仓库 项目保存目录
"server git.wkwork.xyz/tiktok/production-server.git $install_dir/production-server" "server git.wkwork.xyz/tiktok/production-server.git $install_dir/production-server"
...@@ -245,7 +250,7 @@ uninstall_project() { ...@@ -245,7 +250,7 @@ uninstall_project() {
read -r confirm_uninstall read -r confirm_uninstall
if [ "$confirm_uninstall" = "y" ]; then if [ "$confirm_uninstall" = "y" ]; then
echo_content "green" "正在卸载项目..." echo_content "green" "正在卸载项目..."
cd $production_run_dir cd $production_install_dir
docker-compose down docker-compose down
rm -rf "$install_dir" # 删除项目目录 rm -rf "$install_dir" # 删除项目目录
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
...@@ -263,7 +268,7 @@ uninstall_project() { ...@@ -263,7 +268,7 @@ uninstall_project() {
# 函数:启动或重启项目 # 函数:启动或重启项目
start_project() { start_project() {
cd "$production_run_dir" || exit 1 cd "$production_install_dir" || exit 1
echo_content "green" "是否要启动/重启项目?(y/n):" echo_content "green" "是否要启动/重启项目?(y/n):"
read -r restart read -r restart
......
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论