-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(FSADT1-846): adding location details (#174)
- Loading branch information
Paulo Gomes da Cruz Junior
authored
Aug 4, 2023
1 parent
87e4fdc
commit b6afd14
Showing
9 changed files
with
172 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,28 @@ | ||
FROM eclipse-temurin:17.0.8_7-jdk-alpine@sha256:3ecc5edd648f5d9c92e53e8eb6361cfcfaf626220f8308332f239dfb03418c1c | ||
|
||
ENV LANG en_CA.UTF-8 | ||
ENV LANGUAGE en_CA.UTF-8 | ||
ENV LC_ALL en_CA.UTF-8 | ||
### Builder | ||
FROM ghcr.io/graalvm/native-image-community:20-ol7 AS build | ||
|
||
# Copy | ||
WORKDIR /app | ||
COPY pom.xml mvnw ./ | ||
COPY src ./src | ||
COPY .mvn/ ./.mvn | ||
|
||
# Build | ||
RUN ./mvnw -Pnative native:compile | ||
|
||
RUN apk --no-cache add openssl | ||
|
||
COPY startup.sh . | ||
### Deployer | ||
FROM gcr.io/distroless/java-base:nonroot AS deploy | ||
ARG PORT=3001 | ||
|
||
RUN chmod g+w /app && \ | ||
chmod g+x startup.sh && \ | ||
chmod g+w ${JAVA_HOME}/lib/security/cacerts | ||
# Copy | ||
WORKDIR /app | ||
COPY --from=build /app/target/nr-forest-client-api ./nr-forest-client-api | ||
|
||
# Non-privileged user | ||
USER app | ||
# User, port and health check | ||
USER 1001 | ||
EXPOSE ${PORT} | ||
HEALTHCHECK CMD curl -f http://localhost:${PORT}/actuator/health | grep '"status":"UP"' | ||
|
||
ENTRYPOINT ["sh", "startup.sh"] | ||
# Startup | ||
ENTRYPOINT ["/app/nr-forest-client-api"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.