mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-22 07:30:24 +00:00
update
This commit is contained in:
parent
4f1a91d391
commit
1d32ac4b03
1 changed files with 5 additions and 2 deletions
|
@ -164,9 +164,12 @@ old_appmanage=$(cat /data/apps/w9services/w9appmanage/.env |grep APP_VERSION |cu
|
|||
new_appmanage=$(cat /data/apps/websoft9/docker/w9appmanage/.env |grep APP_VERSION |cut -d= -f2)
|
||||
if [ "$old_appmanage" \< "$new_appmanage" ]; then
|
||||
echo "start to update w9appmanage..."
|
||||
cp /data/apps/websoft9/docker/w9appmanage/.env /data/apps/w9services/w9appmanage/.env
|
||||
cp /data/apps/websoft9/docker/w9appmanage/docker-compose.yml /data/apps/w9services/w9appmanage/docker-compose.yml
|
||||
rm -rf /tmp/database.sqlite && sudo docker cp websoft9-appmanage:/usr/src/app/database.sqlite /tmp
|
||||
rm /data/apps/w9services/w9appmanage/.env && cp /data/apps/websoft9/docker/w9appmanage/.env /data/apps/w9services/w9appmanage/.env
|
||||
rm /data/apps/w9services/w9appmanage/docker-compose.yml && cp /data/apps/websoft9/docker/w9appmanage/docker-compose.yml /data/apps/w9services/w9appmanage/docker-compose.yml
|
||||
cd /data/apps/w9services/w9appmanage && sudo docker compose down && sudo docker compose pull && sudo docker compose up -d
|
||||
sudo docker exec -it websoft9-appmanage rm -f /usr/src/app/database.sqlite && sudo docker cp /tmp/database.sqlite websoft9-appmanage:/usr/src/app
|
||||
docker restart websoft9-appmanage
|
||||
else
|
||||
echo "appmanage is not need to update"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue