back.Dockerfile 277 B

12345678910111213
  1. FROM node:11.7.0-alpine
  2. # Back docker image
  3. COPY . /usr/src/app
  4. WORKDIR /usr/src/app
  5. EXPOSE $PORT
  6. RUN yarn install
  7. # Build front if SERVE_CLIENT=true
  8. CMD if [ "$SERVE_CLIENT" == "true" ] ; then yarn run app:build && yarn run server:start ; else yarn run server:start ; fi