diff --git a/.github/workflows/github-action.yaml b/.github/workflows/github-action.yaml index a8e298f..320f5ce 100644 --- a/.github/workflows/github-action.yaml +++ b/.github/workflows/github-action.yaml @@ -72,9 +72,17 @@ jobs: cache-to: type=gha,mode=max push: true + redeploy_dev_service: + name: Redeploy Dev Service + needs: docker_build_and_push + runs-on: ubuntu-latest + steps: + - name: Redeploy Dev Service + run: curl -X POST ${{ secrets.PORTAINER_DEV_SERVICE_WEBHOOK }} + deploy_health_check: name: Check Application Status - needs: docker_build_and_push + needs: redeploy_dev_service runs-on: ubuntu-latest steps: - name: Check the deployed service URL diff --git a/Dockerfile b/Dockerfile index 76b0ebf..a3faaba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Buile Step -FROM node:20.9-alpine AS builder +FROM node:20-alpine AS builder WORKDIR /usr/src/app diff --git a/docker-stack.yaml b/docker-stack.yaml index 38a5a83..2166b9c 100644 --- a/docker-stack.yaml +++ b/docker-stack.yaml @@ -1,33 +1,19 @@ -version: '3.3' +version: '3' services: dev: image: 151345152001.dkr.ecr.ap-northeast-2.amazonaws.com/popo-admin-web:latest ports: - 5001:3001 - logging: - driver: local - options: - max-size: 10m deploy: - labels: - swarmpit.service.deployment.autoredeploy: 'true' placement: constraints: - - node.role != manager - - node.labels.application == popo + - node.role == manager prod: # Prod Image Tag should be updated manually image: 151345152001.dkr.ecr.ap-northeast-2.amazonaws.com/popo-admin-web:vX.X.X ports: - 3001:3001 - logging: - driver: local - options: - max-size: 10m deploy: - labels: - swarmpit.service.deployment.autoredeploy: 'true' placement: constraints: - - node.role != manager - - node.labels.application == popo + - node.role == manager