File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7777 # 2. 릴리스 : main/develop 브랜치로 Push될 때만 실행
7878 makeTagAndRelease :
7979 name : Create Tag and Release
80- if : github.event_name == 'push'
80+ # if: github.event_name == 'push'
8181 needs : backend-ci
8282 runs-on : ubuntu-latest
8383 permissions :
@@ -107,7 +107,7 @@ jobs:
107107 # 3. 빌드 및 배포: main/develop 브랜치로 Push될 때만 실행
108108 buildImageAndPush :
109109 name : 도커 이미지 빌드와 푸시
110- if : github.event_name == 'push'
110+ # if: github.event_name == 'push'
111111 needs : makeTagAndRelease
112112 runs-on : ubuntu-latest
113113 steps :
@@ -149,4 +149,4 @@ jobs:
149149 no-cache : true
150150 tags : |
151151 ghcr.io/${{ env.OWNER_LC }}/catch-course:${{ needs.makeTagAndRelease.outputs.tag_name }}
152- ghcr.io/${{ env.OWNER_LC }}/catch-course:latest
152+ ghcr.io/${{ env.OWNER_LC }}/catch-course:latest
Original file line number Diff line number Diff line change 1- # --- Stage 1: 애플리케이션 빌드 단계 ---
2- # 소스 코드 컴파일
1+ # # --- Stage 1: 애플리케이션 빌드 단계 ---
2+ # # 소스 코드 컴파일
33FROM openjdk:21-jdk-slim AS builder
4- # 컨테이너 내의 작업 디렉터리를 /app으로 설정
4+ # # 컨테이너 내의 작업 디렉터리를 /app으로 설정
55WORKDIR /app
66# 모든 소스코드를 컨테이너의 /app 디렉터리로 복사
77COPY . .
@@ -21,7 +21,7 @@ FROM eclipse-temurin:21-jre
2121# 컨테이너 내의 작업 디렉터리
2222WORKDIR /app
2323# 현재 이미지의 /app 디렉터리로 복사하고, 이름을 app.jar로 변경
24- COPY --from=builder /app/ build/libs/*-SNAPSHOT.jar app.jar
24+ COPY build/libs/*-SNAPSHOT.jar app.jar
2525# 8080 포트를 외부에 노출
2626EXPOSE 8080
2727# "java -jar app.jar" 명령어로 Spring Boot 애플리케이션을 실행
Original file line number Diff line number Diff line change 11services :
2+ # Spring Boot 애플리케이션 서비스 추가
3+ app-prod :
4+ image : ghcr.io/wonseokyoon/catch-course:latest
5+ container_name : app-prod
6+ restart : always
7+ depends_on :
8+ - mysql-db-prod
9+ - redis-prod
10+ - kafka-prod
11+ ports :
12+ - " 8080:8080"
13+ networks :
14+ - prod-network
15+ environment :
16+ - SPRING_PROFILES_ACTIVE=prod
17+ - DB_USERNAME=${DB_USERNAME}
18+ - DB_PASSWORD=${DB_PASSWORD}
19+
220 mysql-db-prod :
321 image : mysql:8.0
422 container_name : mysql-db-prod
@@ -71,4 +89,4 @@ networks:
7189 driver : bridge
7290
7391volumes :
74- mysql_prod_data :
92+ mysql_prod_data:
You can’t perform that action at this time.
0 commit comments