2018-07-15 03:19:58 +00:00
|
|
|
###########################
|
|
|
|
# Mithril
|
|
|
|
###########################
|
|
|
|
FROM node:8-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
|
|
|
|
|
2018-07-15 03:19:58 +00:00
|
|
|
RUN apk add --no-cache make gcc g++ python && \
|
|
|
|
npm install && \
|
|
|
|
npm run build
|
2017-11-05 11:53:54 +00:00
|
|
|
|
2018-07-15 03:19:58 +00:00
|
|
|
###########################
|
|
|
|
# Server
|
|
|
|
###########################
|
|
|
|
FROM node:8-alpine
|
2017-11-05 11:53:54 +00:00
|
|
|
|
2018-07-15 03:19:58 +00:00
|
|
|
ENV HOME=/app
|
|
|
|
|
|
|
|
COPY .babelrc config.js log.js index.js package.json $HOME/
|
|
|
|
|
|
|
|
WORKDIR $HOME
|
|
|
|
|
|
|
|
RUN apk add --no-cache make gcc g++ python && \
|
|
|
|
npm install --production
|
|
|
|
|
|
|
|
COPY api $HOME/api
|
|
|
|
COPY migrations $HOME/migrations
|
|
|
|
COPY config $HOME/config
|
|
|
|
COPY script $HOME/script
|
|
|
|
COPY --from=build /app/public $HOME/public
|
|
|
|
|
|
|
|
EXPOSE 3000
|
2017-11-05 11:53:54 +00:00
|
|
|
|
|
|
|
CMD ["npm", "start"]
|