Last active
April 2, 2019 18:03
-
-
Save inyee786/24bdd306bbc65dfd9b414100f1d93428 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Stage 0, "build-stage", based on Node.js, to build and compile the frontend | |
FROM node:10.8.0 as build-stage | |
WORKDIR /app | |
COPY package*.json /app/ | |
RUN npm install | |
COPY ./ /app/ | |
ARG configuration=production | |
RUN npm run build -- --output-path=./dist/out --configuration $configuration | |
# Stage 1, based on Nginx, to have only the compiled app | |
FROM nginx:1.15 | |
#Copy dist folder to ngnix | |
COPY --from=build-stage /app/dist/out/ /usr/share/nginx/html | |
#Copy default nginx configuration | |
COPY ./nginx-custom.conf /etc/nginx/conf.d/default.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment