forked from CBIIT/bento-c3dc-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (18 loc) · 847 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
FROM node:16.20.1-alpine as build
WORKDIR /usr/src/app
COPY . .
RUN NODE_OPTIONS="--max-old-space-size=4096" npm set progress=false
RUN NODE_OPTIONS="--max-old-space-size=4096" npm ci
RUN NODE_OPTIONS="--max-old-space-size=4096" npm run build --silent
# FROM nginx:1.23.3-alpine
FROM nginx:1.25.2 AS fnl_base_image
RUN apt-get update && apt-get -y upgrade
COPY --from=build /usr/src/app/dist /usr/share/nginx/html
COPY --from=build /usr/src/app/config/inject.template.js /usr/share/nginx/html/inject.template.js
COPY --from=build /usr/src/app/config/nginx.conf /etc/nginx/conf.d/configfile.template
COPY --from=build /usr/src/app/config/entrypoint.sh /
ENV PORT 80
ENV HOST 0.0.0.0
RUN sh -c "envsubst '\$PORT' < /etc/nginx/conf.d/configfile.template > /etc/nginx/conf.d/default.conf"
EXPOSE 80
ENTRYPOINT [ "sh", "/entrypoint.sh" ]