Add docker service for the api + env variables + ...

This commit is contained in:
2020-04-30 12:11:00 +02:00
parent a2ac8d19af
commit 8cf8457a54
6 changed files with 48 additions and 16 deletions
+14
View File
@@ -0,0 +1,14 @@
FROM openjdk:13-alpine
ENV APPLICATION_USER ktor
RUN adduser -D -g '' $APPLICATION_USER
RUN mkdir /app
RUN chown -R $APPLICATION_USER /app
USER $APPLICATION_USER
COPY ./target/api-0.0.1-jar-with-dependencies.jar /app/notes-api.jar
WORKDIR /app
CMD ["java", "-server", "-XX:+UnlockExperimentalVMOptions", "-XX:InitialRAMFraction=2", "-XX:MinRAMFraction=2", "-XX:MaxRAMFraction=2", "-XX:+UseG1GC", "-XX:MaxGCPauseMillis=100", "-XX:+UseStringDeduplication", "-jar", "notes-api.jar"]