Skip to content

Commit 412d86e

Browse files
committed
More compose
1 parent f92b90e commit 412d86e

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

.github/workflows/deploy.yaml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,24 @@ jobs:
1818
with:
1919
ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
2020

21+
- name: Add host
22+
run: |
23+
ssh-keyscan zenful.cloud > ~/.ssh/known_hosts
24+
2125
- name: Set up Docker Compose
2226
run: |
2327
# Install Docker Compose
2428
curl -L "https://github.com/docker/compose/releases/download/v2.19.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
2529
chmod +x /usr/local/bin/docker-compose
2630
27-
- name: Copy over the docker compose file
31+
- name: Run Docker Compose
2832
run: |
29-
scp -o StrictHostKeyChecking=no compose.prod.yaml deploytest@zenful.cloud:guestbook/compose.yaml
30-
- name: Deploy code via SSH
31-
run: |
32-
ssh -o StrictHostKeyChecking=no deploytest@zenful.cloud "cd guestbook && docker compose up -d"
33+
export DB_PASSWORD=${{ secrets.DB_PASSWORD }}
34+
DOCKER_HOST=ssh://deploytest@zenful.cloud docker-compose -f ./compose.prod.yaml up -d
35+
36+
# - name: Copy over the docker compose file
37+
# run: |
38+
# scp -o StrictHostKeyChecking=no compose.prod.yaml deploytest@zenful.cloud:guestbook/compose.yaml
39+
# - name: Deploy code via SSH
40+
# run: |
41+
# ssh -o StrictHostKeyChecking=no deploytest@zenful.cloud "cd guestbook && docker compose up -d"

0 commit comments

Comments
 (0)