blob: 2f74e27507ffd6f7e4aa3d4345d39f3009805b9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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"]
|