pse-podcast-synchronisation/pse-server/Dockerfile

28 lines
877 B
Docker
Raw Permalink Normal View History

2024-06-19 00:14:49 +02:00
# 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"]