-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (29 loc) · 1.24 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
FROM node:20 as build-hub
COPY hub hub
WORKDIR /hub/
RUN yarn install && yarn global add react-scripts sass
RUN yarn build
FROM node:20 as build-web
COPY web web
WORKDIR /web/
RUN yarn install && yarn global add react-scripts sass
RUN yarn build
FROM node:20
# Installs latest Chromium (85) package for puppeteer
RUN apt-get update && apt-get install -y gnupg nginx yarn \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update && apt-get install google-chrome-stable -y fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
COPY wait-for-it.sh /home/wait-for-it.sh
RUN chmod +x /home/wait-for-it.sh
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build-hub /hub/build /usr/share/nginx/html/hub
COPY --from=build-web /web/build /usr/share/nginx/html/web
# Install back
WORKDIR /home/back
COPY back .
RUN yarn install && yarn run build
CMD ["node", "/home/back/dist/server.js"]
STOPSIGNAL SIGTERM
EXPOSE 8080 8081 8082