Skip to content

Commit

Permalink
Merge pull request #130 from Team-Motivoo/fix/#121-firebase_db_step_c…
Browse files Browse the repository at this point in the history
…ount

[DOCS] Docker를 이용한 빌드 설정 변경
  • Loading branch information
jun02160 authored Mar 2, 2024
2 parents 0a4ef74 + f176c7a commit 60ca9b9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/api-CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:

- name: Docker Image 빌드 및 푸시
run: |
docker build --platform linux/amd64 -t yejunpark1/motivoo-api-server .
docker build --platform linux/amd64 -f Dockerfile-API -t yejunpark1/motivoo-api-server .
docker push yejunpark1/motivoo-api-server
- name: deploy.sh EC2 인스턴스로 전송
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/batch-CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:

- name: Docker Image 빌드 및 푸시
run: |
docker build --platform linux/amd64 -t yejunpark1/motivoo-batch-server .
docker build --platform linux/amd64 -f Dockerfile-BATCH -t yejunpark1/motivoo-batch-server .
docker push yejunpark1/motivoo-batch-server
- name: deploy.sh EC2 인스턴스로 전송
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile-API
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM amd64/amazoncorretto:17
WORKDIR /app
COPY ./motivoo-api/build/libs/motivoo-api-0.0.1-SNAPSHOT.jar /app/API_APPLICATION.jar
CMD ["java", "-Duser.timezone=Asia/Seoul", "-jar", "-Dspring.profiles.active=deploy", "API_APPLICATION.jar"]
2 changes: 0 additions & 2 deletions Dockerfile → Dockerfile-BATCH
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
FROM amd64/amazoncorretto:17
WORKDIR /app
COPY ./motivoo-api/build/libs/motivoo-api-0.0.1-SNAPSHOT.jar /app/API_APPLICATION.jar
COPY ./motivoo-batch/build/libs/motivoo-batch-0.0.1-SNAPSHOT.jar /app/BATCH_APPLICATION.jar
CMD ["java", "-Duser.timezone=Asia/Seoul", "-jar", "-Dspring.profiles.active=deploy", "API_APPLICATION.jar"]
CMD ["java", "-Duser.timezone=Asia/Seoul", "-jar", "-Dspring.profiles.active=deploy", "BATCH_APPLICATION.jar"]
17 changes: 12 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ services:
- TZ=Asia/Seoul
depends_on:
- redis
networks:
- motivoo-net

blue-batch:
container_name: blue-batch
Expand All @@ -27,8 +29,8 @@ services:
- "8081:8081"
environment:
- TZ=Asia/Seoul
depends_on:
- redis
networks:
- motivoo-net


green-api:
Expand All @@ -42,7 +44,8 @@ services:
- TZ=Asia/Seoul
depends_on:
- redis

networks:
- motivoo-net

green-batch:
container_name: green-batch
Expand All @@ -53,5 +56,9 @@ services:
- "8083:8081"
environment:
- TZ=Asia/Seoul
depends_on:
- redis
networks:
- motivoo-net

networks:
motivoo-net:
driver: bridge

0 comments on commit 60ca9b9

Please sign in to comment.