update docker & CI config

This commit is contained in:
Sam 2020-05-17 19:12:22 +02:00
parent 2540fa79d3
commit 736a1f910a
4 changed files with 17 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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