Docker config

This commit is contained in:
2019-10-05 21:23:10 -04:00
parent 76e6955a03
commit 94e3acbd47
3 changed files with 66 additions and 3 deletions

25
Display/Dockerfile Normal file
View File

@@ -0,0 +1,25 @@
### STAGE 1: Build ###
FROM node:12.11.0-alpine as builder
COPY package.json package-lock.json ./
RUN npm ci && mkdir /ng-app && mv ./node_modules ./ng-app
WORKDIR /ng-app
COPY . .
RUN npm run ng build -- --prod --output-path=dist
### STAGE 2: Setup ###
FROM nginx:1.17.4-alpine
COPY nginx/default.conf /etc/nginx/conf.d/
RUN rm -rf /usr/share/nginx/html/*
COPY --from=builder /ng-app/dist /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]