forked from hygieia/UI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (23 loc) · 707 Bytes
/
Copy pathDockerfile
File metadata and controls
36 lines (23 loc) · 707 Bytes
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
# build environment
FROM node:10.16.0 as builder
# set working directory
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
ENV PATH /usr/src/app/node_modules/.bin:$PATH
COPY package.json /usr/src/app/package.json
RUN npm install
RUN npm install -g @angular/cli@8.0.6 --unsafe
COPY . /usr/src/app
RUN npm run build --output-path=dist
FROM httpd:2.4-alpine
# copy compiled app to server
COPY --from=builder /usr/src/app/dist/hygieia-ui /usr/local/apache2/htdocs/
COPY ./httpd/.htaccess /usr/local/apache2/htdocs/.htaccess
# copy startup script
COPY ./startup.sh /startup.sh
# make script executable
RUN chmod +x /startup.sh
# expose port 80
EXPOSE 80
ENTRYPOINT ["/startup.sh"]
CMD ["httpd-foreground"]