-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
49 lines (35 loc) · 934 Bytes
/
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
FROM node:16.14.2
ARG REVISION=unknown
RUN apt-get update && apt-get install -y \
exiftran \
&& rm -rf /var/lib/apt/lists/*
ENV NPM_CONFIG_LOGLEVEL warn
ENV PROJECT_ROOT /app/
COPY .env /app/
COPY server /app/server/
WORKDIR /app/server/
RUN yarn install \
&& yarn run prod \
&& yarn cache clean
COPY website /app/website/
WORKDIR /app/website/
RUN yarn install \
&& yarn run build-prod \
&& rm -fr node_modules \
&& yarn cache clean
COPY client /app/client/
WORKDIR /app/client/
RUN yarn install \
&& yarn run build \
&& rm -fr node_modules tmp \
&& yarn cache clean
COPY new-client /app/new-client/
WORKDIR /app/new-client/
# TODO: Remove the temporary esbuild remirror fix (rm -fr node_modules/jsdom)
RUN yarn install \
&& rm -fr node_modules/jsdom \
&& yarn run build-prod \
&& rm -fr node_modules \
&& yarn cache clean
RUN echo -n $REVISION > /app/server/REVISION
WORKDIR /app/server/