-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.web
34 lines (28 loc) · 1.09 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
# Copyright(c) 2022 aasaam software development group
FROM node:16-bullseye-slim AS frontend
ADD app/front-cp /app/frontend
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/frontend \
&& npm install --force \
&& npm run htm-manifest \
&& npm run htm-favicon \
&& npm run make \
&& ls -lah dist
FROM nginx:1
COPY --from=frontend /app/frontend/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