back.Dockerfile 344 B

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