2018-08-04 23:35:17 +00:00
|
|
|
FROM node:8
|
2018-07-08 18:17:19 +00:00
|
|
|
|
2018-08-04 23:35:17 +00:00
|
|
|
# Create app directory
|
|
|
|
WORKDIR /usr/src/app
|
2018-07-08 18:17:19 +00:00
|
|
|
|
2018-08-04 23:35:17 +00:00
|
|
|
# Install app dependencies
|
|
|
|
# A wildcard is used to ensure both package.json AND package-lock.json are copied
|
|
|
|
# where available (npm@5+)
|
|
|
|
COPY ./client/package*.json ./
|
2018-07-08 18:17:19 +00:00
|
|
|
|
|
|
|
RUN npm install
|
2018-08-04 23:35:17 +00:00
|
|
|
# If you are building your code for production
|
|
|
|
# RUN npm install --only=production
|
2018-07-08 18:17:19 +00:00
|
|
|
|
2018-08-04 23:35:17 +00:00
|
|
|
# Bundle app source
|
|
|
|
COPY ./client .
|
2018-07-08 18:17:19 +00:00
|
|
|
|
2018-08-04 23:35:17 +00:00
|
|
|
EXPOSE 3000
|
|
|
|
RUN npm run build:dev
|
|
|
|
CMD ["node", "dist/index.js"]
|