diff --git a/backend/Dockerfile b/backend/Dockerfile index 56f8316..ab4e581 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -7,4 +7,5 @@ FROM openjdk:11-jre-slim WORKDIR /root COPY --from=build /root/build/libs/*.jar app.jar EXPOSE 5000 +ENV PROFILE=prod ENTRYPOINT ["java", "-jar", "app.jar"] diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index 5a68d62..8ac7638 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -2,4 +2,4 @@ server.port=5000 spring.datasource.hikari.initialization-fail-timeout=0 spring.datasource.hikari.max-lifetime=300000 spring.jpa.show-sql=true -spring.profiles.active=prod \ No newline at end of file +spring.profiles.active=${PROFILE:dev} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index e5daad0..daa9343 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,6 +17,8 @@ services: context: ./backend ports: - "5000:5000" + environment: + PROFILE: prod depends_on: - db