nfpis/Dockerfile

38 lines
515 B
Text
Raw Normal View History

2018-07-16 05:31:21 +00:00
###########################
# Website
###########################
FROM node:alpine as build
ENV HOME=/app
COPY package.json $HOME/
WORKDIR $HOME
RUN npm install
2018-07-16 05:31:21 +00:00
COPY app $HOME/app
COPY public $HOME/public
RUN npm run build
###########################
# Server
###########################
FROM node:alpine
ENV HOME=/app \
NODE_ENV=production
COPY config.json package.json $HOME/
WORKDIR $HOME
RUN npm install --production
2018-07-16 05:31:21 +00:00
COPY --from=build /app/public $HOME/public
EXPOSE 3000
CMD ["npm", "start"]