[Updated] Dockerfiles so everything runs using docker compose up, added the benchmark and speed tests

This commit is contained in:
Ninjaws
2024-11-01 19:52:53 +01:00
parent 675bdc7f8e
commit 595b83b364
14 changed files with 143 additions and 17 deletions
+14 -3
View File
@@ -16,11 +16,22 @@ ENV USER=dev
RUN groupadd -g ${GID} ${USER} \
&& useradd -m -u ${UID} -g ${USER} ${USER}
USER ${USER}
EXPOSE 8080
EXPOSE 9090
CMD ["tail","-f","/dev/null"]
#---Building
FROM base AS build
COPY . .
RUN mvn clean package -DskipTests
#--Testing
FROM build AS testing
RUN mvn clean test
#---Production
#---Production
# Pulled again to get rid of maven, to decrease the size
FROM openjdk:17-jdk-slim AS production
WORKDIR /app
COPY --from=build /app/target/*.jar app.jar
EXPOSE 9090
ENTRYPOINT ["java", "-jar", "app.jar"]