From 10e9d89349035cd71d6680990807b73938259054 Mon Sep 17 00:00:00 2001 From: "Lin, Hung-Shin" Date: Sun, 5 Nov 2023 23:27:50 +0800 Subject: [PATCH] Update deployment (#58) * Update ci_cd.yml Remove deployment scripts, moved to authorized_keys instead. * Update docker-compose.prod.yml to always restart --- .github/workflows/ci_cd.yml | 4 ---- docker-compose.prod.yml | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 549922a..73fbcb8 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -119,7 +119,3 @@ jobs: port: ${{ secrets.SERVER_PORT }} username: ${{ secrets.SERVER_USER }} key: ${{ secrets.SERVER_SSH_KEY }} - script: | - cd ${{ secrets.SERVER_PATH }} - docker compose -f docker-compose.prod.yml pull - docker compose -f docker-compose.prod.yml up -d diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 4af7bf6..5174a73 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -4,6 +4,7 @@ services: image: lancatlin/linux-odyssey:app depends_on: - backend + restart: always build: context: . dockerfile: app/Dockerfile @@ -16,7 +17,7 @@ services: image: lancatlin/linux-odyssey:backend depends_on: - db - restart: on-failure + restart: always build: context: . dockerfile: server/Dockerfile @@ -40,6 +41,7 @@ services: context: . dockerfile: packages/analytics/Dockerfile target: prod + restart: always depends_on: - db networks: