forked from eea/circularity-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (23 loc) · 871 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
FROM node:16-slim
COPY . /opt/frontend/
WORKDIR /opt/frontend/
# Update apt packages
RUN runDeps="openssl ca-certificates patch gosu git tmux locales-all" \
&& apt-get update \
&& apt-get install -y --no-install-recommends $runDeps \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& npm install -g mrs-developer \
&& cp jsconfig.json.prod jsconfig.json \
&& mkdir -p /opt/frontend/src/addons \
&& rm -rf /opt/frontend/src/addons/* \
&& find /opt/frontend -not -user node -exec chown node {} \+
USER node
RUN cd /opt/frontend \
&& RAZZLE_API_PATH=VOLTO_API_PATH RAZZLE_INTERNAL_API_PATH=VOLTO_INTERNAL_API_PATH yarn \
&& RAZZLE_API_PATH=VOLTO_API_PATH RAZZLE_INTERNAL_API_PATH=VOLTO_INTERNAL_API_PATH yarn build \
&& rm -rf /home/node/.cache
USER root
EXPOSE 3000 3001 4000 4001
ENTRYPOINT ["/opt/frontend/entrypoint.sh"]
CMD ["yarn", "start:prod"]