Skip to content

Commit

Permalink
More compose
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottminns committed Nov 12, 2024
1 parent f92b90e commit c97de6f
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,23 @@ jobs:
with:
ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}

- name: Add host
run: |
ssh-keyscan [email protected] > ~/.ssh/known_hosts
- name: Set up Docker Compose
run: |
# Install Docker Compose
curl -L "https://github.com/docker/compose/releases/download/v2.19.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
- name: Copy over the docker compose file
- name: Run Docker Compose
run: |
scp -o StrictHostKeyChecking=no compose.prod.yaml [email protected]:guestbook/compose.yaml
- name: Deploy code via SSH
run: |
ssh -o StrictHostKeyChecking=no [email protected] "cd guestbook && docker compose up -d"
DOCKER_HOST=ssh://[email protected] docker-compose -f ./compose.prod.yaml up -d
# - name: Copy over the docker compose file
# run: |
# scp -o StrictHostKeyChecking=no compose.prod.yaml [email protected]:guestbook/compose.yaml
# - name: Deploy code via SSH
# run: |
# ssh -o StrictHostKeyChecking=no [email protected] "cd guestbook && docker compose up -d"

0 comments on commit c97de6f

Please sign in to comment.