diff --git a/.travis.yml b/.travis.yml index 57e0037c..c212738e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,9 @@ before_script: - export REACT_APP_API_URL=http://127.0.0.1 - export NODE_ENV=development - export TEST_URL=http://127.0.0.1 + - export UI_URL=http://127.0.0.1:3000 + - export EMAIL_URL=smtp://none:none@0.0.0.0:1025 + - export SENDER_EMAIL=fittrackee@example.com - export DISPLAY=:99.0 - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) - sh -e /etc/init.d/xvfb start diff --git a/docker-compose-ci.yml b/docker-compose-ci.yml index b51b1ce9..a93682e6 100644 --- a/docker-compose-ci.yml +++ b/docker-compose-ci.yml @@ -19,6 +19,9 @@ services: environment: - DATABASE_URL=postgres://postgres:postgres@fittrackee-db:5432/fittrackee - DATABASE_TEST_URL=postgres://postgres:postgres@fittrackee-db:5432/fittrackee_test + - UI_URL=http://127.0.0.1:3000 + - EMAIL_URL=smtp://none:none@0.0.0.0:1025 + - SENDER_EMAIL=fittrackee@example.com - FLASK_APP=server.py - FLASK_DEBUG=1 - APP_SETTINGS=fittrackee_api.config.TestingConfig diff --git a/docker-compose.yml b/docker-compose.yml index 65a354d1..ac73264d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,6 +19,9 @@ services: environment: - DATABASE_URL=postgres://postgres:postgres@fittrackee-db:5432/fittrackee - DATABASE_TEST_URL=postgres://postgres:postgres@fittrackee-db:5432/fittrackee_test + - UI_URL=http://127.0.0.1:3000 + - EMAIL_URL=smtp://none:none@0.0.0.0:1025 + - SENDER_EMAIL=fittrackee@example.com - FLASK_APP=server.py - FLASK_DEBUG=1 - APP_SETTINGS=fittrackee_api.config.DevelopmentConfig diff --git a/fittrackee_api/Dockerfile b/fittrackee_api/Dockerfile index 5400444f..73b05c95 100644 --- a/fittrackee_api/Dockerfile +++ b/fittrackee_api/Dockerfile @@ -10,6 +10,14 @@ WORKDIR /usr/src/app COPY ./pyproject.toml /usr/src/app/pyproject.toml COPY ./poetry.lock /usr/src/app/poetry.lock +# add environment variables +ARG UI_URL +ARG EMAIL_URL +ARG SENDER_EMAIL +ENV UI_URL $UI_URL +ENV EMAIL_URL $EMAIL_URL +ENV SENDER_EMAIL $SENDER_EMAIL + # install requirements RUN pip install --upgrade pip RUN pip install poetry