29 lines
341 B
Docker
29 lines
341 B
Docker
|
|
FROM node:10
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY package.json .
|
|
|
|
# install backend dependencies
|
|
RUN yarn
|
|
|
|
# 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" ]
|