filo_caspar/Dockerfile

38 lines
569 B
Text
Raw Permalink Normal View History

2018-07-15 03:19:58 +00:00
###########################
# Mithril
###########################
2020-04-05 05:19:23 +00:00
FROM node:13-alpine as build
2017-11-05 11:53:54 +00:00
ENV HOME=/app
COPY package.json $HOME/
2018-07-15 03:19:58 +00:00
COPY app $HOME/app
COPY public $HOME/public
2017-11-05 11:53:54 +00:00
WORKDIR $HOME
2020-04-07 10:36:11 +00:00
RUN npm install && \
npm run build && \
rm -rf node_modules
2017-11-05 11:53:54 +00:00
2018-07-15 03:19:58 +00:00
###########################
# Server
###########################
2020-04-05 05:19:23 +00:00
FROM node:13-alpine
2017-11-05 11:53:54 +00:00
2018-07-15 03:19:58 +00:00
ENV HOME=/app
COPY index.mjs package.json $HOME/
2018-07-15 03:19:58 +00:00
WORKDIR $HOME
2020-04-07 10:36:11 +00:00
RUN npm install --production
2018-07-15 03:19:58 +00:00
COPY api $HOME/api
COPY config $HOME/config
COPY --from=build /app/public $HOME/public
EXPOSE 3000
2017-11-05 11:53:54 +00:00
CMD ["npm", "start"]