add CI env variable to avoid react-script exiting

This commit is contained in:
Sam 2020-04-29 17:04:35 +02:00
parent a66725399e
commit e82db4dcf6
2 changed files with 6 additions and 3 deletions

View File

@ -4,7 +4,7 @@ services:
fittrackee-db: fittrackee-db:
container_name: fittrackee-db container_name: fittrackee-db
build: https://github.com/SamR1/mpwo.git#${BRANCH}:fittrackee_api/db build: https://github.com/SamR1/FitTrackee.git#${BRANCH}:fittrackee_api/db
ports: ports:
- 5435:5432 - 5435:5432
environment: environment:
@ -13,7 +13,7 @@ services:
fittrackee-api: fittrackee-api:
container_name: fittrackee-api container_name: fittrackee-api
build: https://github.com/SamR1/mpwo.git#${BRANCH}:fittrackee_api build: https://github.com/SamR1/FitTrackee.git#${BRANCH}:fittrackee_api
ports: ports:
- 5001:5000 - 5001:5000
environment: environment:
@ -30,11 +30,12 @@ services:
fittrackee-client: fittrackee-client:
container_name: fittrackee-client container_name: fittrackee-client
build: build:
context: https://github.com/SamR1/mpwo.git#${BRANCH} context: https://github.com/SamR1/FitTrackee.git#${BRANCH}
dockerfile: ./fittrackee_client/Dockerfile dockerfile: ./fittrackee_client/Dockerfile
args: args:
- NODE_ENV=development - NODE_ENV=development
- REACT_APP_API_URL=${REACT_APP_API_URL} - REACT_APP_API_URL=${REACT_APP_API_URL}
- CI=true
ports: ports:
- 3007:3000 - 3007:3000
depends_on: depends_on:

View File

@ -13,9 +13,11 @@ ENV PATH /usr/src/app/node_modules/.bin:$PATH
ARG REACT_APP_API_URL ARG REACT_APP_API_URL
ARG NODE_ENV ARG NODE_ENV
ARG REACT_APP_ALLOW_REGISTRATION ARG REACT_APP_ALLOW_REGISTRATION
ARG CI
ENV NODE_ENV $NODE_ENV ENV NODE_ENV $NODE_ENV
ENV REACT_APP_API_URL $REACT_APP_API_URL ENV REACT_APP_API_URL $REACT_APP_API_URL
ENV REACT_APP_ALLOW_REGISTRATION $REACT_APP_ALLOW_REGISTRATION ENV REACT_APP_ALLOW_REGISTRATION $REACT_APP_ALLOW_REGISTRATION
ENV CI $CI
# install and cache app dependencies # install and cache app dependencies
COPY package.json /usr/src/app/package.json COPY package.json /usr/src/app/package.json