Skip to content

Commit

Permalink
feat: update docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
1jeongg committed Sep 24, 2024
1 parent 7769536 commit ccf5ef7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions wasin/DockerFileProd
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ RUN ./gradlew clean build -Pprofile=prod -x test
FROM eclipse-temurin:17-jdk-jammy

WORKDIR /opt/wasin
ENV PROJECT_NAME=backend-0.0.1-SNAPSHOT.jar
COPY --from=build /home/gradle/project/build/libs/$PROJECT_NAME .
COPY --from=build /home/gradle/project/build/libs/backend-0.0.1-SNAPSHOT.jar .

ENV DB_URL=${DB_URL}
ENV DB_PASSWORD=${DB_PASSWORD}

CMD ["java", "-Dspring.profiles.active=prod", "-jar", "${ARTIFACT_NAME}"]
CMD ["java", "-Dspring.profiles.active=prod", "-jar", "backend-0.0.1-SNAPSHOT.jar"]
4 changes: 2 additions & 2 deletions wasin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ FROM eclipse-temurin:17-jdk-jammy

WORKDIR /opt/wasin

COPY --from=build /home/gradle/project/build/libs/backend.jar .
COPY --from=build /home/gradle/project/build/libs/backend-0.0.1-SNAPSHOT.jar .

ENV DB_URL=${DB_LOCAL_URL}
ENV DB_PASSWORD=${DB_LOCAL_PASSWORD}

CMD ["java", "-Dspring.profiles.active=prod", "-jar", "backend.jar"]
CMD ["java", "-Dspring.profiles.active=prod", "-jar", "backend-0.0.1-SNAPSHOT.jar"]

0 comments on commit ccf5ef7

Please sign in to comment.