Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] 무중단 배포 적용 #900

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.