Loading .dockerignore +4 −0 Original line number Diff line number Diff line node_modules Dockerfile README.md .gitignore .git Dockerfile +8 −17 Original line number Diff line number Diff line FROM node:9-alpine as builder MAINTAINER barbora.kompisova@gmail.com FROM ppdeassis/node-nginx-alpine:latest # lets install dependencies WORKDIR /app COPY . . RUN rm -rf node_modules COPY package.json /app/ RUN npm set progress=false && npm config set depth 0 && npm cache clean --force RUN npm install COPY . /app/ RUN $(npm bin)/ng build --prod FROM nginx:1.13-alpine COPY --from=builder /app/dist /var/www RUN yarn install RUN yarn cache clean # starting: build the app (using env vars), update nginx conf and start nginx CMD /bin/sh ./docker_run.sh docker_run.sh 0 → 100644 +19 −0 Original line number Diff line number Diff line #!/usr/bin/env sh set -e set -x NODE_ENV="${NODE_ENV:-development}" SCRIPT_HOME=`dirname $0` PROJECT_HOME="${SCRIPT_HOME}/.." # build the app yarn run build # copy the dist to nginx html dir cp -a "${PROJECT_HOME}/dist/." /usr/share/nginx/html/ # update nginx default.conf cp "${PROJECT_HOME}/config/nginx.default.conf" /etc/nginx/conf.d/default.conf # start nginx nginx -g 'daemon off;' package-lock.jsondeleted 100644 → 0 +0 −13779 File deleted.Preview size limit exceeded, changes collapsed. Show changes Loading
.dockerignore +4 −0 Original line number Diff line number Diff line node_modules Dockerfile README.md .gitignore .git
Dockerfile +8 −17 Original line number Diff line number Diff line FROM node:9-alpine as builder MAINTAINER barbora.kompisova@gmail.com FROM ppdeassis/node-nginx-alpine:latest # lets install dependencies WORKDIR /app COPY . . RUN rm -rf node_modules COPY package.json /app/ RUN npm set progress=false && npm config set depth 0 && npm cache clean --force RUN npm install COPY . /app/ RUN $(npm bin)/ng build --prod FROM nginx:1.13-alpine COPY --from=builder /app/dist /var/www RUN yarn install RUN yarn cache clean # starting: build the app (using env vars), update nginx conf and start nginx CMD /bin/sh ./docker_run.sh
docker_run.sh 0 → 100644 +19 −0 Original line number Diff line number Diff line #!/usr/bin/env sh set -e set -x NODE_ENV="${NODE_ENV:-development}" SCRIPT_HOME=`dirname $0` PROJECT_HOME="${SCRIPT_HOME}/.." # build the app yarn run build # copy the dist to nginx html dir cp -a "${PROJECT_HOME}/dist/." /usr/share/nginx/html/ # update nginx default.conf cp "${PROJECT_HOME}/config/nginx.default.conf" /etc/nginx/conf.d/default.conf # start nginx nginx -g 'daemon off;'
package-lock.jsondeleted 100644 → 0 +0 −13779 File deleted.Preview size limit exceeded, changes collapsed. Show changes