Skip to content

Commit

Permalink
[Release] 리뷰미 v2.0.1
Browse files Browse the repository at this point in the history
배포 순간의 서비스 중단을 막기위해 무중단 배포를 적용했습니다.
  • Loading branch information
skylar1220 authored Oct 24, 2024
2 parents 7b572c7 + 3a33ef5 commit 409f295
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 99 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/backend-dev-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ on:
- 'backend/**'

env:
ARTIFACT_NAME: review-me-dev
ARTIFACT_DIRECTORY: ./backend/build/libs
APPLICATION_DIRECTORY: /home/ubuntu/review-me

jobs:
Expand Down Expand Up @@ -79,9 +77,11 @@ jobs:
username: ${{ secrets.DOCKERHUB_ID }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Pull from DockerHub
- name: Deploy new version
env:
PROFILE_VAR: "dev"
run: |
sudo docker-compose --env-file .env.dev down || true
sudo docker pull ${{ secrets.DOCKERHUB_ID }}/review-me-app:develop
sudo docker-compose --env-file .env.dev up -d
chmod +x ./deploy.sh
sudo -E ./deploy.sh
working-directory: ${{ env.APPLICATION_DIRECTORY }}/app
16 changes: 5 additions & 11 deletions .github/workflows/backend-prod-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,8 @@ name: "[RELEASE] CD using Github self-hosted runner"

on:
workflow_dispatch:
push:
branches:
- release
paths:
- 'backend/**'

env:
ARTIFACT_NAME: review-me-prod
ARTIFACT_DIRECTORY: ./backend/build/libs
APPLICATION_DIRECTORY: /home/ubuntu/review-me

jobs:
Expand Down Expand Up @@ -82,9 +75,10 @@ jobs:
username: ${{ secrets.DOCKERHUB_ID }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Pull from DockerHub
- name: Deploy new version
env:
PROFILE_VAR: "prod"
run: |
sudo docker-compose --env-file .env.prod down || true
sudo docker pull ${{ secrets.DOCKERHUB_ID }}/review-me-app:release
sudo docker-compose --env-file .env.prod up -d
chmod +x ./deploy.sh
sudo -E ./deploy.sh
working-directory: ${{ env.APPLICATION_DIRECTORY }}/app
82 changes: 0 additions & 82 deletions .github/workflows/zero-downtime-deploy-test-cd.yml

This file was deleted.

0 comments on commit 409f295

Please sign in to comment.