-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.client-prod
39 lines (25 loc) · 1.18 KB
/
Dockerfile.client-prod
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
38
FROM tjokvol/montepoeli-base-node-modules:latest AS builder
# RUN apt-get -y update && apt-get -y install curl
COPY package.json package.json
COPY package-lock.json package-lock.json
COPY apps/client/tsconfig.json apps/client/tsconfig.json
COPY apps/client/tsconfig.app.json apps/client/tsconfig.app.json
COPY apps/client/.eslintrc.json apps/client/.eslintrc.json
COPY apps/client/ngsw-config.json apps/client/ngsw-config.json
COPY apps/client/jest.config.js apps/client/jest.config.js
COPY apps/client/tsconfig.spec.json apps/client/tsconfig.spec.json
COPY .eslintrc.json .eslintrc.json
COPY angular.json angular.json
COPY tsconfig.json tsconfig.json
COPY jest.config.js jest.config.js
RUN npm install
RUN npm run client:compile-ivy-dependencies
COPY apps/client/src apps/client/src
# RUN npm run client:lint # Currently not running because it is so slow
RUN npm run client:test:cov
RUN npm run client:build:prod
FROM nginx:alpine
COPY apps/client/nginx.conf /etc/nginx/nginx.conf
COPY apps/client/dynamic-environments usr/dynamic-environments
COPY --from=builder /usr/src/app/dist/apps/client/ /usr/share/nginx/html/
COPY --from=builder /usr/src/app/apps/client/coverage/* /usr/coverage/