-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.prod
39 lines (25 loc) · 940 Bytes
/
Dockerfile.prod
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
FROM rust:latest AS logic-builder
WORKDIR /logic
COPY src/logic ./
RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
RUN wasm-pack build frontend
FROM node:lts AS frontend-builder
WORKDIR /frontend
COPY src/frontend/package.json ./
RUN yarn
COPY src/frontend/src src
COPY --from=logic-builder /logic/frontend/pkg logic
COPY src/frontend/webpack.config.js src/frontend/.babelrc src/frontend/elm.json ./
RUN NODE_ENV=production yarn build
FROM hseeberger/scala-sbt:8u222_1.3.4_2.13.1
WORKDIR /backend
COPY . ./
RUN sbt clean stage
COPY --from=frontend-builder /frontend/dist /tmp/static
RUN mkdir -p /static
EXPOSE 9000
CMD rm -rf /static/* && cp -r /tmp/static/* /static && \
target/universal/stage/bin/robot-rumble \
# https://stackoverflow.com/a/29244028
-Dpidfile.path=/dev/null \
-Dplay.http.secret.key='QCY?tAnfk?aZ?iwrNwnxIlR6CTf:G3gf:90Latabg@5241AB`R5W:1uDFN];Ik@n'