Skip to content

Commit 1ed8bf6

Browse files
committed
refactor: profiles 환경 변수 주입으로 변경
1 parent 1980af7 commit 1ed8bf6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/release-workflow.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ jobs:
7878
push: true
7979
tags: ${{ steps.meta.outputs.tags }}
8080
labels: ${{ steps.meta.outputs.labels }}
81+
build-args: |
82+
SPRING_PROFILES_ACTIVE=dev
8183
8284
deploy:
8385
name: EC2 자동 배포

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,8 @@ WORKDIR /app
2020

2121
COPY --from=builder /libs/build/libs/*.jar app.jar
2222

23-
ENTRYPOINT ["java", "-Dspring.profiles.active=dev", "-jar", "app.jar"]
23+
ARG SPRING_PROFILES_ACTIVE
24+
ENV SPRING_PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE}
25+
26+
ENTRYPOINT ["java", "-Dspring.profiles.active=${SPRING_PROFILES_ACTIVE}", "-jar", "app.jar"]
2427

0 commit comments

Comments
 (0)