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
|
|
|
|
|
2018-07-15 03:19:58 +00:00
|
|
|
RUN apk add --no-cache make gcc g++ python && \
|
|
|
|
npm install && \
|
2020-04-05 05:12:55 +00:00
|
|
|
apk del make gcc g++ python && \
|
2018-07-15 03:19:58 +00:00
|
|
|
npm run build
|
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 .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"]
|