Skip to content

Commit

Permalink
chore: 스프링 프로필 동적으로 주입하도록 스크립트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekks committed Sep 6, 2024
1 parent c34e152 commit f9bed10
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/k3s-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
run: |
for MODULE in $(echo $CHANGED_MODULES | tr "," "\n"); do
IMAGE_TAG="${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}/$MODULE:${{ env.SHA_SHORT }}"
docker build ./$MODULE -t $IMAGE_TAG
docker build --build-arg SPRING_PROFILE=dev ./$MODULE -t $IMAGE_TAG
docker push $IMAGE_TAG
done
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/k3s-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
run: |
for MODULE in $(echo $CHANGED_MODULES | tr "," "\n"); do
IMAGE_TAG="${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}/$MODULE:${{ env.SHA_SHORT }}"
docker build ./$MODULE -t $IMAGE_TAG
docker build --build-arg SPRING_PROFILE=prod ./$MODULE -t $IMAGE_TAG
docker push $IMAGE_TAG
done
Expand Down
2 changes: 1 addition & 1 deletion layer-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ COPY ${JAR_FILE} layer-server.jar

ENV SPRING_PROFILE=${SPRING_PROFILE}

ENTRYPOINT ["java", "-Duser.timezone=Asia/Seoul","-Dspring.profiles.active=prod" ,"-jar" ,"layer-server.jar"]
ENTRYPOINT ["java", "-Duser.timezone=Asia/Seoul","-Dspring.profiles.active=${SPRING_PROFILE}" ,"-jar" ,"layer-server.jar"]

0 comments on commit f9bed10

Please sign in to comment.