-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
28 lines (22 loc) · 1.02 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
FROM clojure:openjdk-17-tools-deps-buster AS clj-build
USER root
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
apt-get -y update && \
apt-get -y dist-upgrade && \
apt-get install -y nodejs && \
npm install --global yarn
WORKDIR /code
ENV REPO="/code/.m2/repository"
COPY package.json deps.edn yarn.lock ./
RUN yarn install --non-interactive --frozen-lockfile
COPY . .
RUN echo "Compile CLJS..." && \
clj -Sdeps "{:mvn/local-repo \"$REPO\"}" -M:dev -m "shadow.cljs.devtools.cli" release :main && \
echo "Done. " && \
echo "Compiling CLJ..." && \
clj -Sdeps "{:mvn/local-repo \"$REPO\"}" -T:build uber
FROM openjdk:17-slim
COPY src/main/config/prod.edn /config/production.edn
EXPOSE 8080
ENTRYPOINT ["java", "-Dlog4j2.formatMsgNoLookups=true", "-Dconfig=/config/production.edn", "-Dfulcro.logging=info", "-jar", "decide.jar", "-XX:+UseContainerSupport", "-XX:MaxRAMPercentage=85", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseZGC"]
COPY --from=clj-build /code/target/decide.jar decide.jar