-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
61 lines (55 loc) · 1.49 KB
/
Dockerfile
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM openjdk:17-jdk-slim AS build
COPY . .
RUN chmod +x ./gradlew
RUN ./gradlew server:shadowJar
FROM openjdk:17-jdk-slim
ARG POSTGRES_PORT
ARG POSTGRES_DB
ARG POSTGRES_USER
ARG POSTGRES_PASSWORD
ARG JDBC_DATABASE_URL
ARG JDBC_DRIVER
ARG HOST
ARG PORT
ARG FORCE_HTTPS
ARG JWT_REALM
ARG JWT_SECRET
ARG JWT_AUDIENCE
ARG JWT_ISSUER
ARG EMAIL_HOST
ARG EMAIL_PORT
ARG EMAIL_USERNAME
ARG EMAIL_PASSWORD
ARG REQUIRE_EMAIL_VERIFY
ARG SCHEME_EMAIL_VERIFY
ARG HOST_EMAIL_VERIFY
ARG CORS_PORT
ARG CORS_HOST
ARG CORS_SCHEME
ENV POSTGRES_PORT=${POSTGRES_PORT}
ENV POSTGRES_DB=${POSTGRES_DB}
ENV POSTGRES_USER=${POSTGRES_USER}
ENV POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
ENV JDBC_DATABASE_URL=${JDBC_DATABASE_URL}
ENV JDBC_DRIVER=${JDBC_DRIVER}
ENV HOST=${HOST}
ENV PORT=${PORT}
ENV FORCE_HTTPS=${FORCE_HTTPS}
ENV JWT_REALM=${JWT_REALM}
ENV JWT_SECRET=${JWT_SECRET}
ENV JWT_AUDIENCE=${JWT_AUDIENCE}
ENV JWT_ISSUER=${JWT_ISSUER}
ENV EMAIL_HOST=${EMAIL_HOST}
ENV EMAIL_PORT=${EMAIL_PORT}
ENV EMAIL_USERNAME=${EMAIL_USERNAME}
ENV EMAIL_PASSWORD=${EMAIL_PASSWORD}
ENV REQUIRE_EMAIL_VERIFY=${REQUIRE_EMAIL_VERIFY}
ENV SCHEME_EMAIL_VERIFY=${SCHEME_EMAIL_VERIFY}
ENV HOST_EMAIL_VERIFY=${HOST_EMAIL_VERIFY}
ENV CORS_PORT=${CORS_PORT}
ENV CORS_HOST=${CORS_HOST}
ENV CORS_SCHEME=${CORS_SCHEME}
ENV PORT=${PORT}
EXPOSE ${PORT}
COPY --from=build ./server/build/libs/server-*-all.jar ./server.jar
ENTRYPOINT ["java", "--add-opens", "java.base/jdk.internal.misc=ALL-UNNAMED", "-Dio.netty.tryReflectionSetAccessible=true", "-jar", "server.jar"]