Update deployment (#58)

* Update ci_cd.yml

Remove deployment scripts, moved to authorized_keys instead.

* Update docker-compose.prod.yml to always restart
This commit is contained in:
Lin, Hung-Shin authored and Annie Huang committed 2023-11-12 21:24:01 +08:00
1 parent 0b8a143a63
commit 96cdd2b157
2 files changed
+3 -5

No files matched your search

-4
View File
@@ -119,7 +119,3 @@ jobs:
port: ${{ secrets.SERVER_PORT }} port: ${{ secrets.SERVER_PORT }}
username: ${{ secrets.SERVER_USER }} username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SERVER_SSH_KEY }} 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
+3 -1
View File
@@ -4,6 +4,7 @@ services:
image: lancatlin/linux-odyssey:app image: lancatlin/linux-odyssey:app
depends_on: depends_on:
- backend - backend
restart: always
build: build:
context: . context: .
dockerfile: app/Dockerfile dockerfile: app/Dockerfile
@@ -16,7 +17,7 @@ services:
image: lancatlin/linux-odyssey:backend image: lancatlin/linux-odyssey:backend
depends_on: depends_on:
- db - db
restart: on-failure restart: always
build: build:
context: . context: .
dockerfile: server/Dockerfile dockerfile: server/Dockerfile
@@ -40,6 +41,7 @@ services:
context: . context: .
dockerfile: packages/analytics/Dockerfile dockerfile: packages/analytics/Dockerfile
target: prod target: prod
restart: always
depends_on: depends_on:
- db - db
networks: networks: