From fbe436e0e115da03e85620676674f853df11845d Mon Sep 17 00:00:00 2001 From: malteish Date: Tue, 24 Sep 2024 09:57:01 +0200 Subject: [PATCH] on deploy, sync docker compose later background: when removing containers, doing docker compose down with the new docker compose file will not remove the containers that are not in the file anymore. This causes issues. --- .github/workflows/deploy.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9e37d4b43..77bf5614d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -133,13 +133,15 @@ jobs: rsync -avz -e 'ssh -i ./ssh-key' ./.env app@${{ vars.HOST_DOMAIN }}:/home/app/dm3 rsync -avz -e 'ssh -i ./ssh-key' ./dm3-*.tar app@${{ vars.HOST_DOMAIN }}:/home/app/dm3 rsync -avz -e 'ssh -i ./ssh-key' ./nginx.conf app@${{ vars.HOST_DOMAIN }}:/home/app/dm3 - rsync -avz -e 'ssh -i ./ssh-key' ./docker/docker-compose.yml app@${{ vars.HOST_DOMAIN }}:/home/app/dm3 - name: Stop docker on server run: | ssh -i ./ssh-key app@${{ vars.HOST_DOMAIN }} "\ cd dm3 && docker compose down" ssh -i ./ssh-key root@${{ vars.HOST_DOMAIN }} "\ systemctl restart docker.service" + - name: Send docker compose to server + run: | + rsync -avz -e 'ssh -i ./ssh-key' ./docker/docker-compose.yml app@${{ vars.HOST_DOMAIN }}:/home/app/dm3 - name: Load docker images run: | ssh -i ./ssh-key app@${{ vars.HOST_DOMAIN }} "\