Make backend choosable in docker-compose
This commit is contained in:
parent
8b2e26042c
commit
41756f67b4
@ -7,4 +7,5 @@ FROM openjdk:11-jre-slim
|
|||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
COPY --from=build /root/build/libs/*.jar app.jar
|
COPY --from=build /root/build/libs/*.jar app.jar
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
ENV PROFILE=prod
|
||||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||||
|
@ -2,4 +2,4 @@ server.port=5000
|
|||||||
spring.datasource.hikari.initialization-fail-timeout=0
|
spring.datasource.hikari.initialization-fail-timeout=0
|
||||||
spring.datasource.hikari.max-lifetime=300000
|
spring.datasource.hikari.max-lifetime=300000
|
||||||
spring.jpa.show-sql=true
|
spring.jpa.show-sql=true
|
||||||
spring.profiles.active=prod
|
spring.profiles.active=${PROFILE:dev}
|
@ -17,6 +17,8 @@ services:
|
|||||||
context: ./backend
|
context: ./backend
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
|
environment:
|
||||||
|
PROFILE: prod
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user