Skip to content

Commit

Permalink
on deploy, sync docker compose later
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
malteish committed Sep 24, 2024
1 parent bbb9844 commit fbe436e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }} "\
Expand Down

0 comments on commit fbe436e

Please sign in to comment.