diff --git a/.travis.yml b/.travis.yml index d082eb19..72300e33 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,9 +26,9 @@ before_install: before_script: - export DATABASE_TEST_URL=postgres://postgres:@localhost:5432/mpwo_test - export APP_SETTINGS=mpwo_api.config.TestingConfig - - export REACT_APP_USERS_SERVICE_URL=http://127.0.0.1:5000/api/ + - export REACT_APP_USERS_SERVICE_URL=http://0.0.0.0:5000/api/ - export NODE_ENV=development - - export TEST_URL=http://127.0.0.1:3000 + - export TEST_URL=http://0.0.0.0:3000 - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start - sleep 3 @@ -37,8 +37,7 @@ before_script: script: - psql -c 'create database mpwo_test;' -U postgres - docker-compose -f docker-compose-ci.yml run api flask init_db - - echo $NODE_ENV - sh test.sh after_script: -- docker-compose down + - docker-compose down diff --git a/mpwo_client/Dockerfile-ci b/mpwo_client/Dockerfile-ci index 8af5cf7d..32ed8d92 100644 --- a/mpwo_client/Dockerfile-ci +++ b/mpwo_client/Dockerfile-ci @@ -16,10 +16,13 @@ ENV REACT_APP_USERS_SERVICE_URL $REACT_APP_USERS_SERVICE_URL # install and cache app dependencies ADD package.json /usr/src/app/package.json RUN npm install --silent -RUN npm install react-scripts -g +RUN npm install pushstate-server -g --silent # add app ADD . /usr/src/app/ +# build react app +RUN npm run build + # start app -CMD ["npm", "start"] +CMD ["pushstate-server", "build"]