Skip to content

Commit

Permalink
chore: reverting back the native build
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj committed Oct 24, 2024
1 parent 9cc47cd commit 56c4ebd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
14 changes: 10 additions & 4 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,27 @@ WORKDIR /app
COPY pom.xml mvnw ./
COPY src ./src
COPY .mvn/ ./.mvn
COPY InstallCert.java .

# Build
RUN ./mvnw -Pnative -DskipTests -Dskip.unit.tests=true -Dspring-boot.run.profiles=prod native:compile
RUN ./mvnw package -Pnative -DskipTests -Dskip.unit.tests=true -Dspring-boot.run.profiles=prod

### Deployer
FROM gcr.io/distroless/java-base:nonroot AS deploy
FROM eclipse-temurin:17.0.12_7-jdk-jammy AS deploy

# Copy
WORKDIR /app
COPY --from=build /app/target/results ./nr-results-backend
COPY --from=build /app/target/*.jar /app/*.class ./artifacts/
COPY dockerfile-entrypoint.sh ./
RUN mkdir config dump public && \
chmod -R g+w . && \
chmod g+x dockerfile-entrypoint.sh && \
chmod g+w ${JAVA_HOME}/lib/security/cacerts

# Port and health check
USER 1001
EXPOSE 8080
HEALTHCHECK CMD curl -f http://localhost:8080/actuator/health | grep '"status":"UP"'

# Startup
ENTRYPOINT ["/app/nr-results-backend","--spring.profiles.active=container,prod"]
ENTRYPOINT ["/app/dockerfile-entrypoint.sh"]
13 changes: 0 additions & 13 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,6 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.springframework.experimental</groupId>
<artifactId>spring-aot-maven-plugin</artifactId>
<version>0.11.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Expand Down
2 changes: 1 addition & 1 deletion backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spring:

# Common database settings
jpa:
show-sql: true
show-sql: false

# FAM
security:
Expand Down

0 comments on commit 56c4ebd

Please sign in to comment.