Switch to OpenJ9 for container

This commit is contained in:
William Brawner 2021-06-14 18:06:47 -06:00
parent 36ee1bccfa
commit 9b3b4fac17
2 changed files with 29 additions and 28 deletions

View file

@ -8,8 +8,7 @@ COPY --chown=gradle:gradle . /home/gradle/src
WORKDIR /home/gradle/src
RUN /home/gradle/src/gradlew --console=plain --no-daemon bootJar
FROM openjdk:14-jdk-slim
FROM adoptopenjdk:openj9
EXPOSE 8080
COPY --from=builder /home/gradle/src/api/build/libs/api.jar twigs-api.jar
CMD /usr/local/openjdk-14/bin/java $JVM_ARGS -jar /twigs-api.jar
CMD /opt/java/openjdk/bin/java $JVM_ARGS -jar /twigs-api.jar

View file

@ -8,15 +8,16 @@ services:
depends_on:
- db
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://db:3306/budget
SPRING_DATASOURCE_URL: "jdbc:mysql://db:3306/budget?useSSL=false"
SPRING_JPA_HIBERNATE_DDL-AUTO: update
SERVER_TOMCAT_MAX-THREADS: 5
TWIGS_CORS_DOMAINS: "http://localhost:4200"
networks:
- twigs
command: sh -c "sleep 5 && /opt/java/openjdk/bin/java $JVM_ARGS -jar /twigs-api.jar"
db:
image: mysql:5
image: mysql:5.7
ports:
- "3306:3306"
environment:
@ -26,6 +27,7 @@ services:
MYSQL_PASSWORD: budget
networks:
- twigs
hostname: db
networks:
twigs: