Skip to content

Commit

Permalink
[YS-236] chore: 개발/운영 환경에 따라 도커 이미지에 태그 추가하도록 수정 (#72)
Browse files Browse the repository at this point in the history
* chore: add env tag to docker image

* chore: alter cicd yml for added file
  • Loading branch information
Ji-soo708 authored Jan 30, 2025
1 parent 3e1a33a commit 4b52953
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cicd-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ jobs:
source: "./scripts/deploy.sh"
target: "/home/ubuntu/"

- name: ✔️ send docker-compose.yml to EC2 development server
- name: ✔️ send docker-compose-dev.yml to EC2 development server
uses: appleboy/scp-action@master
with:
username: ubuntu
host: ${{ secrets.DEV_WAS_HOST }}
key: ${{ secrets.DEV_WAS_KEY }}
port: ${{ secrets.WAS_SSH_PORT }}
source: "./docker-compose.yml"
source: "./docker-compose-dev.yml"
target: "/home/ubuntu/"

cd:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cicd-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ jobs:
source: "./scripts/deploy.sh"
target: "/home/ubuntu/"

- name: ✔️ send docker-compose.yml to EC2 production server
- name: ✔️ send docker-compose-prod.yml to EC2 production server
uses: appleboy/scp-action@master
with:
username: ubuntu
host: ${{ secrets.PROD_WAS_HOST }}
key: ${{ secrets.PROD_WAS_KEY }}
port: ${{ secrets.WAS_SSH_PORT }}
source: "./docker-compose.yml"
source: "./docker-compose-prod.yml"
target: "/home/ubuntu/"

cd:
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml → docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.8'
services:
blue:
container_name: blue
image: jisoo708/dobby
image: gradmeet/dobby:dev
expose:
- 8080
ports:
Expand All @@ -11,7 +11,7 @@ services:
- TZ=Asia/Seoul
green:
container_name: green
image: jisoo708/dobby
image: gradmeet/dobby:dev
expose:
- 8080
ports:
Expand Down
20 changes: 20 additions & 0 deletions docker-compose-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3.8'
services:
blue:
container_name: blue
image: gradmeet/dobby:prod
expose:
- 8080
ports:
- "8081:8080"
environment:
- TZ=Asia/Seoul
green:
container_name: green
image: gradmeet/dobby:prod
expose:
- 8080
ports:
- "8082:8080"
environment:
- TZ=Asia/Seoul

0 comments on commit 4b52953

Please sign in to comment.