forked from kbss-cvut/fta-fmea-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (23 loc) · 988 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
FROM node:16-alpine AS BASE
WORKDIR /usr/src/app
COPY package.json package-lock.json ./
FROM base AS dependencies
RUN npm install
COPY ./ ./
FROM dependencies as build
RUN npm run build
# RELEASE STAGE
FROM nginx
COPY --from=build /usr/src/app/public/index.html /usr/share/nginx/html/index.html
COPY --from=build /usr/src/app/public/build/bundle.js /usr/share/nginx/html/build/bundle.js
COPY --from=build /usr/src/app/public/images/InterExcellence.png /usr/share/nginx/html/images/InterExcellence.png
COPY --from=build /usr/src/app/public/images/MSMT.png /usr/share/nginx/html/images/MSMT.png
RUN chmod a+r -R /usr/share/nginx/html
COPY deploy/.docker/config.js.template /etc/nginx/config.js.template
COPY deploy/.docker/error.html /usr/share/nginx/html/error.html
COPY deploy/.docker/nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
COPY deploy/.docker/docker-entrypoint.sh /
RUN chmod a+x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]