diff --git a/.github/workflows/k3s-dev.yaml b/.github/workflows/k3s-dev.yaml index d9c22f7d..bef2a125 100644 --- a/.github/workflows/k3s-dev.yaml +++ b/.github/workflows/k3s-dev.yaml @@ -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 diff --git a/.github/workflows/k3s-prod.yaml b/.github/workflows/k3s-prod.yaml index 263bf99b..cfbbc34a 100644 --- a/.github/workflows/k3s-prod.yaml +++ b/.github/workflows/k3s-prod.yaml @@ -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 diff --git a/layer-api/Dockerfile b/layer-api/Dockerfile index d792f5bf..04505691 100644 --- a/layer-api/Dockerfile +++ b/layer-api/Dockerfile @@ -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"] \ No newline at end of file +ENTRYPOINT ["java", "-Duser.timezone=Asia/Seoul","-Dspring.profiles.active=${SPRING_PROFILE}" ,"-jar" ,"layer-server.jar"] \ No newline at end of file