Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
FROM node:10 AS builder
COPY package.json package-lock.json ./
RUN npm install
## Storing node modules on a separate layer will prevent unnecessary npm installs at each build
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD false
RUN npm i && mkdir /ng-app && mv ./node_modules ./ng-app
WORKDIR /ng-app
COPY ./ ./
# building with the --prod flag doesn't produce a binary.
RUN cd src/app && $(npm bin)/ng build --output-path=dist

FROM nginx

COPY dist /usr/share/nginx/html
COPY --from=builder /ng-app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf



EXPOSE 80

# When the container starts, replace the env.js with values from environment variables
Expand Down