first test with docker

This commit is contained in:
lesion
2019-03-05 00:19:13 +01:00
parent 91579e56dd
commit e10e081563
14 changed files with 106 additions and 95 deletions

29
Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
FROM node:10
WORKDIR /usr/src/app
COPY package.json .
# install backend dependencies
RUN yarn install
# copy source
COPY . .
# install nodemon
RUN yarn global add nodemon
WORKDIR /usr/src/app/client
# install frontend dependencies
RUN yarn
# build frontend
RUN yarn build
WORKDIR /usr/src/app
EXPOSE 12300
CMD [ "yarn", "run", "serve" ]