From 0695ad26bd956f1307f0de98a70fc050823ad725 Mon Sep 17 00:00:00 2001 From: Kenneth Date: Tue, 27 May 2025 15:48:18 +0100 Subject: [PATCH] migrate to docker compose --- .github/workflows/deploy.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 15caeb6..07ace4a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -33,12 +33,9 @@ jobs: - name: Deploy website run: | MACHINE_IP="$(tailscale ip -4 $MACHINE_NAME)" - ssh -i ~/.ssh/key "kenneth@$MACHINE_IP" /bin/bash << EOF + ssh -i ~/.ssh/key "$MACHINE_USER_NAME:@$MACHINE_IP" /bin/bash << EOF cd /opt/website git pull - docker build -t website . - docker stop website-container - docker rm website-container - docker run --name=website-container --restart=always --publish 5432:80 --detach website + cd ../ + docker compose up --build --detach website EOF -