Skip to content

Commit 5bbc30d

Browse files
authored
Merge db935b9 into d920a92
2 parents d920a92 + db935b9 commit 5bbc30d

3 files changed

Lines changed: 26 additions & 8 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
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

backend/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# --- Stage 1: 애플리케이션 빌드 단계 ---
2-
# 소스 코드 컴파일
1+
## --- Stage 1: 애플리케이션 빌드 단계 ---
2+
## 소스 코드 컴파일
33
FROM openjdk:21-jdk-slim AS builder
4-
# 컨테이너 내의 작업 디렉터리를 /app으로 설정
4+
## 컨테이너 내의 작업 디렉터리를 /app으로 설정
55
WORKDIR /app
66
# 모든 소스코드를 컨테이너의 /app 디렉터리로 복사
77
COPY . .
@@ -21,7 +21,7 @@ FROM eclipse-temurin:21-jre
2121
# 컨테이너 내의 작업 디렉터리
2222
WORKDIR /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 포트를 외부에 노출
2626
EXPOSE 8080
2727
# "java -jar app.jar" 명령어로 Spring Boot 애플리케이션을 실행

backend/docker-compose-prod.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
services:
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

7391
volumes:
74-
mysql_prod_data:
92+
mysql_prod_data:

0 commit comments

Comments
 (0)