Files
gancio/Dockerfile

34 lines
459 B
Docker
Raw Normal View History

2019-03-05 00:19:13 +01:00
FROM node:10
WORKDIR /usr/src/app
2019-03-24 17:12:41 +01:00
2019-03-05 00:19:13 +01:00
COPY package.json .
2019-03-10 01:01:23 +01:00
COPY pm2.json .
2019-03-24 17:12:41 +01:00
COPY .env.production .
2019-03-05 00:19:13 +01:00
# install backend dependencies
2019-03-11 00:20:37 +01:00
RUN yarn
2019-03-05 00:19:13 +01:00
# copy source
2019-03-10 01:01:23 +01:00
COPY app app/
COPY client client/
2019-03-05 00:19:13 +01:00
# install nodemon
2019-03-10 01:01:23 +01:00
RUN yarn global add pm2
2019-03-05 00:19:13 +01:00
WORKDIR /usr/src/app/client
# install frontend dependencies
RUN yarn
# build frontend
2019-03-24 17:12:41 +01:00
RUN export $(cat /usr/src/app/.env.production); yarn build
2019-03-05 00:19:13 +01:00
WORKDIR /usr/src/app
EXPOSE 12300
2019-03-10 01:01:23 +01:00
CMD [ "pm2-runtime", "start", "pm2.json" ]