Skip to content

Commit

Permalink
Revert deployment changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-emilius committed Nov 22, 2024
1 parent 191d053 commit 4a74898
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions .github/workflows/deploy_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,23 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
environment:
environment:
name: ${{ inputs.environment }}
url: '${{ vars.CLIENT_HOST }}'
steps:
- name: SSH to VM and Execute Docker-Compose Down
uses: appleboy/[email protected]
with:
host: ${{ vars.VM_HOST }}
username: ${{ vars.VM_USERNAME }}
key: ${{ secrets.VM_SSH_PRIVATE_KEY }}
proxy_host: ${{ vars.DEPLOYMENT_GATEWAY_HOST }}
proxy_username: ${{ vars.DEPLOYMENT_GATEWAY_USER }}
proxy_key: ${{ secrets.DEPLOYMENT_GATEWAY_SSH_KEY }}
proxy_port: ${{ vars.DEPLOYMENT_GATEWAY_PORT }}
script: |
docker compose -f docker-compose.prod.yml --env-file=.env.prod down --remove-orphans --rmi all
- name: checkout
uses: actions/checkout@v4

Expand Down Expand Up @@ -67,19 +80,6 @@ jobs:
source: "master.cf"
target: /home/${{ vars.VM_USERNAME }}/postfix-config/

- name: Copy thesis-track-backup.sh to VM Host
uses: appleboy/[email protected]
with:
host: ${{ vars.VM_HOST }}
username: ${{ vars.VM_USERNAME }}
key: ${{ secrets.VM_SSH_PRIVATE_KEY }}
proxy_host: ${{ vars.DEPLOYMENT_GATEWAY_HOST }}
proxy_username: ${{ vars.DEPLOYMENT_GATEWAY_USER }}
proxy_key: ${{ secrets.DEPLOYMENT_GATEWAY_SSH_KEY }}
proxy_port: ${{ vars.DEPLOYMENT_GATEWAY_PORT }}
source: "thesis-track-backup.sh"
target: /home/${{ vars.VM_USERNAME }}

- name: SSH to VM and create .env.prod
uses: appleboy/[email protected]
with:
Expand Down Expand Up @@ -150,6 +150,4 @@ jobs:
proxy_key: ${{ secrets.DEPLOYMENT_GATEWAY_SSH_KEY }}
proxy_port: ${{ vars.DEPLOYMENT_GATEWAY_PORT }}
script: |
docker compose -f docker-compose.prod.yml --env-file=.env.prod pull client server
docker compose -f docker-compose.prod.yml --env-file=.env.prod restart postfix
docker compose -f docker-compose.prod.yml --env-file=.env.prod up -d
docker compose -f docker-compose.prod.yml --env-file=.env.prod up --pull=always -d

0 comments on commit 4a74898

Please sign in to comment.