From ed29cab955fae99fb9d8b7face489ff96494f379 Mon Sep 17 00:00:00 2001 From: Deki Akbar Date: Sat, 10 Feb 2024 04:51:51 +0700 Subject: [PATCH] update: make docker autostart & forece recreate on deploy --- .github/workflows/deploy.yml | 2 +- docker-compose.prod.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e4d5d3b..3377680 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -30,4 +30,4 @@ jobs: script: | cd image-optimizer git pull origin master - docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --no-deps --build + docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --no-deps --build --force-recreate diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 20178be..09c4769 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -1,4 +1,5 @@ version: "3" services: node: + restart: always command: bash -c "npm install && npm run build && npm run start:prod" \ No newline at end of file