-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.web
37 lines (31 loc) · 1.15 KB
/
Dockerfile.web
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
# Copyright(c) 2022 aasaam software development group
FROM node:16-bullseye-slim AS frontend
ADD app/front-cp /app/front-cp
ARG PROXY_HTTP
RUN export DEBIAN_FRONTEND=noninteractive ; \
export LANG=en_US.utf8 ; \
export LC_ALL=C.UTF-8 ; \
apt-get update -y \
&& apt-get autoremove -y \
&& apt-get -y upgrade && apt-get install -y --no-install-recommends build-essential ca-certificates \
&& echo 'cache = "/tmp/npm"' > /root/.npmrc \
&& npm -g update
RUN cd /app/front-cp && \
npm install --force && \
pwd && \
ls -la && \
ls -la ./node_modules && \
npm run analytic-manifest && \
npm run analytic-favicon && \
npm run make && \
ls -lah dist
FROM nginx:1
COPY --from=frontend /app/front-cp/dist /web-app
ADD nginx/cert-local /cert
ADD nginx/nginx.conf /etc/nginx/nginx.conf
ADD nginx/mime.types /etc/nginx/mime.types
ADD nginx/common-http.conf /etc/nginx/common-http.conf
ADD nginx/common-server.conf /etc/nginx/common-server.conf
ADD nginx/common-proxy.conf /etc/nginx/common-proxy.conf
ADD nginx/common-protected.conf /etc/nginx/common-protected.conf
ADD nginx/templates/default.prod.conf.template /etc/nginx/templates/default.conf.template