-
-
Save dlrandy/b3e3b8246f2337352f1f34b76e802e64 to your computer and use it in GitHub Desktop.
Revisions
-
changhuixu revised this gist
May 10, 2020 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -17,6 +17,5 @@ RUN rm -rf /usr/share/nginx/html/* COPY --from=builder /dist /usr/share/nginx/html COPY ./.nginx/nginx.conf /etc/nginx/nginx.conf ENTRYPOINT ["nginx", "-g", "daemon off;"] -
changhuixu created this gist
May 10, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ # 1. Build our Angular app FROM node:alpine as builder WORKDIR /app COPY package.json package-lock.json ./ ENV CI=1 RUN npm ci COPY . . RUN npm run build -- --prod --output-path=/dist # 2. Deploy our Angular app to NGINX FROM nginx:alpine ## Replace the default nginx index page with our Angular app RUN rm -rf /usr/share/nginx/html/* COPY --from=builder /dist /usr/share/nginx/html COPY ./.nginx/nginx.conf /etc/nginx/nginx.conf EXPOSE 4200 80 ENTRYPOINT ["nginx", "-g", "daemon off;"]