diff options
Diffstat (limited to 'pse-server/Dockerfile')
-rw-r--r-- | pse-server/Dockerfile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pse-server/Dockerfile b/pse-server/Dockerfile new file mode 100644 index 0000000..2f74e27 --- /dev/null +++ b/pse-server/Dockerfile @@ -0,0 +1,27 @@ +# syntax=docker/dockerfile:1 + +FROM maven:3.8-eclipse-temurin-17-alpine AS builder + +COPY . ./app +WORKDIR /app +RUN mvn package -B -DskipTests -DfinalName=server.jar + +FROM eclipse-temurin:17-jdk-jammy +COPY --from=builder /app/target/server.jar . + +# Ensure the docker container uses the same timezone as the server +ARG SERVER_TIMEZONE=Europe/Berlin +ENV TZ=$SERVER_TIMEZONE +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update && apt-get install -y tzdata + +ENV SPRING_MAIL_HOST=<YOUR MAIL HOST SMTP> +ENV SPRING_MAIL_PORT=587 +ENV SPRING_MAIL_USERNAME=<YOUR MAIL ADDRESS> +ENV SPRING_MAIL_PASSWORD=<YOUR MAIL PASSWORD> +ENV EMAIL_DASHBOARD_BASE_URL=http://<YOUR FRONTEND DOMAIN> +ENV EMAIL_VERIFICATION_URL=http://<YOUR BACKEND DOMAIN>/api/2/auth/%s/verify.json +ENV EMAIL_RESET_URL_PATH=/resetPassword + +CMD ["java", "-server", "-Xms1G", "-Xmx1G", "-XX:+UseZGC", "-jar", "server.jar"] + |