Update build-and-deploy.yml

Removing old containers during deploy
This commit is contained in:
Ronny Seiger 2021-11-11 11:03:53 +01:00 committed by GitHub
parent 5c82dd84b4
commit fdb7d2bf64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,6 +78,7 @@ jobs:
cd /home/${{ secrets.SSH_USER }}/ cd /home/${{ secrets.SSH_USER }}/
touch acme.json touch acme.json
sudo chmod 0600 acme.json sudo chmod 0600 acme.json
sudo docker-compose down --remove-orphans
sudo echo "PUB_IP=$(wget -qO- http://ipecho.net/plain | xargs echo)" | sed -e 's/\./-/g' > .env sudo echo "PUB_IP=$(wget -qO- http://ipecho.net/plain | xargs echo)" | sed -e 's/\./-/g' > .env
sudo docker-compose up -d sudo docker-compose up -d