-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
36 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,13 +106,22 @@ jobs: | |
sudo systemctl reload nginx | ||
# Blue-Green 설정 Docker Compose 실행 | ||
- name: Deploy with Docker Compose on EC2 | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.EC2_HOST }} | ||
username: ${{ secrets.EC2_USER }} | ||
key: ${{ secrets.EC2_SSH_KEY }} | ||
script: | | ||
cd ~/bitta-front | ||
docker-compose down | ||
docker-compose up -d | ||
- name: Deploy with Docker Compose on EC2 | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.EC2_HOST }} | ||
username: ${{ secrets.EC2_USER }} | ||
key: ${{ secrets.EC2_SSH_KEY }} | ||
script: | | ||
cd ~/bitta-project | ||
docker-compose down | ||
docker-compose up -d --no-deps | ||
sudo nginx -s reload | ||
# test | ||
- name: Test Frontend Response | ||
run: curl --fail http://${{ secrets.EC2_HOST }} || exit 1 | ||
|
||
- name: Test Backend Response | ||
run: curl --fail http://${{ secrets.EC2_HOST }}/api/ || exit 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,29 @@ | ||
version: '3' | ||
services: | ||
backend: | ||
container_name: backend-blue | ||
frontend-blue: | ||
image: publicdeveh/bitta-front:latest | ||
ports: | ||
- "3001:3000" | ||
environment: | ||
- NODE_ENV=production | ||
|
||
frontend-green: | ||
image: publicdeveh/bitta-front:latest | ||
ports: | ||
- "3002:3000" | ||
environment: | ||
- NODE_ENV=production | ||
|
||
backend-blue: | ||
image: publicdeveh/bitta-kotlin:latest | ||
ports: | ||
- "8081:8000" | ||
environment: | ||
- SPRING_PROFILES_ACTIVE=prod | ||
|
||
backend_alternate: | ||
container_name: backend-green | ||
backend-green: | ||
image: publicdeveh/bitta-kotlin:latest | ||
ports: | ||
- "8082:8000" | ||
environment: | ||
- SPRING_PROFILES_ACTIVE=prod | ||
- SPRING_PROFILES_ACTIVE=prod |