Created
June 25, 2019 19:06
-
-
Save martindevnow/ad4fcf23be58a1957a0c0c042d4c0ff6 to your computer and use it in GitHub Desktop.
This file contains 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
# Builder | |
FROM node:9.11.1 as builder | |
COPY package*.json /tmp/ | |
RUN cd /tmp && CI=true npm install | |
WORKDIR /usr/src/app | |
COPY . /usr/src/app/ | |
ENV NODE_ENV=production | |
RUN cp -a /tmp/node_modules /usr/src/app/ && npm run build | |
# Make production build | |
FROM node:9.11.1 as prodBuild | |
RUN npm install -g http-server-ssl http-server | |
WORKDIR /app | |
COPY --from=builder /usr/src/app/dist . | |
EXPOSE 80 | |
EXPOSE 443 | |
CMD [ "http-server-ssl", "-p", "443", "-S", "/app" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment