添加项目更新脚本

This commit is contained in:
2024-08-29 11:18:21 +08:00
parent 5a0b6cc72f
commit f0ae23a5e3

15
update.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
# 拉取最新的git
git pull
# 构建新镜像
docker-compose build
# 停止旧的容器
docker-compose down
# 启动新的容器
docker-compose up -d
# 查看容器运行情况
docker ps
# 查看镜像
docker images
echo "更新完成,请确认容器版本正确,自行删除过期镜像。"