gancio/Dockerfile

32 lines
390 B
Text
Raw Normal View History

2019-03-05 00:19:13 +01:00
FROM node:10
WORKDIR /usr/src/app
COPY package.json .
2019-03-10 01:01:23 +01:00
COPY pm2.json .
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
RUN yarn build
WORKDIR /usr/src/app
EXPOSE 12300
2019-03-10 01:01:23 +01:00
CMD [ "pm2-runtime", "start", "pm2.json" ]