forked from bullhorn/career-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (28 loc) · 805 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
33
34
35
36
37
38
#########################
### build environment ###
#########################
# base image
FROM node:14.16.1 as builder
# set working directory
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
# add `/usr/src/app/node_modules/.bin` to $PATH
ENV PATH /usr/src/app/node_modules/.bin:$PATH
# install and cache app dependencies
COPY package-lock.json /usr/src/app/package-lock.json
COPY package.json /usr/src/app/package.json
RUN npm install -g @angular/[email protected] --unsafe
RUN npm ci
# add app
COPY . /usr/src/app
# generate build
RUN npm run build:qa
##################
### production ###
##################
# base image
FROM httpd:2.4
# copy artifact build from the 'build environment'
COPY --from=builder /usr/src/app/dist/career-portal/browser /usr/local/apache2/htdocs/
# expose port 80
EXPOSE 80