后端更新启动脚本

This commit is contained in:
石皮幼鸟 2024-04-26 19:26:48 +08:00
parent c6ee408376
commit dba81c95a3
1 changed files with 22 additions and 0 deletions

22
initGameBackend.sh Normal file
View File

@ -0,0 +1,22 @@
cd project || exit
# 如果已有文件目录,先删除
sudo rm -rf CatchTheLettersBackend
# 从Git上拉取代码
git clone http://1.14.105.160:9211/ethereal/CatchTheLettersBackend.git
# 进入项目目录,打包
cd CatchTheLettersBackend || exit
mvn clean package -Dmaven.test.skip=true
# 如果已有镜像或已启动容器,先删除
sudo docker stop catch-the-letters
sudo docker rm catch-the-letters
sudo docker rmi catch-the-letters
# 构建镜像
sudo docker build -t catch-the-letters .
# 启动容器
sudo docker run -d -p 3536:3536 --restart=always --name catch-the-letters catch-the-letters