Skip to content

Commit 0695ad2

Browse files
committed
migrate to docker compose
1 parent a843e7b commit 0695ad2

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,9 @@ jobs:
3333
- name: Deploy website
3434
run: |
3535
MACHINE_IP="$(tailscale ip -4 $MACHINE_NAME)"
36-
ssh -i ~/.ssh/key "kenneth@$MACHINE_IP" /bin/bash << EOF
36+
ssh -i ~/.ssh/key "$MACHINE_USER_NAME:@$MACHINE_IP" /bin/bash << EOF
3737
cd /opt/website
3838
git pull
39-
docker build -t website .
40-
docker stop website-container
41-
docker rm website-container
42-
docker run --name=website-container --restart=always --publish 5432:80 --detach website
39+
cd ../
40+
docker compose up --build --detach website
4341
EOF
44-

0 commit comments

Comments
 (0)