API - minor fix + update .env templates

This commit is contained in:
Sam 2021-07-17 12:33:11 +02:00
parent 8862368a71
commit 9254c02f1a
3 changed files with 14 additions and 14 deletions

View File

@ -13,13 +13,13 @@ export UPLOAD_FOLDER=/usr/src/app/uploads
# Database # Database
export DATABASE_URL=postgresql://fittrackee:fittrackee@fittrackee-db:5432/fittrackee export DATABASE_URL=postgresql://fittrackee:fittrackee@fittrackee-db:5432/fittrackee
export DATABASE_TEST_URL=postgresql://fittrackee:fittrackee@fittrackee-db:5432/fittrackee_test export DATABASE_TEST_URL=postgresql://fittrackee:fittrackee@fittrackee-db:5432/fittrackee_test
export DATABASE_DISABLE_POOLING= # export DATABASE_DISABLE_POOLING=
# Emails # Emails
export UI_URL=http://0.0.0.0:5000 export UI_URL=http://0.0.0.0:5000
export EMAIL_URL=smtp://none:none@mail:1025 export EMAIL_URL=smtp://none:none@mail:1025
export SENDER_EMAIL=fittrackee@example.com export SENDER_EMAIL=fittrackee@example.com
export REDIS_URL=redis://redis:6379 # export REDIS_URL=redis://redis:6379
export WORKERS_PROCESSES=2 export WORKERS_PROCESSES=2
# Workouts # Workouts

View File

@ -6,24 +6,24 @@
# export HOST= # export HOST=
# export PORT= # export PORT=
# export APP_SETTINGS=fittrackee.config.ProductionConfig # export APP_SETTINGS=fittrackee.config.ProductionConfig
export APP_SECRET_KEY= export APP_SECRET_KEY='please change me'
# export APP_WORKERS= # export APP_WORKERS=
export APP_LOG=fittrackee.log export APP_LOG=fittrackee.log
export UPLOAD_FOLDER= export UPLOAD_FOLDER=
# Database # Database
# export DATABASE_URL=postgresql://fittrackee:fittrackee@${HOST}:5432/fittrackee # export DATABASE_URL=postgresql://fittrackee:fittrackee@${HOST}:5432/fittrackee
export DATABASE_DISABLE_POOLING= # export DATABASE_DISABLE_POOLING=
# Emails # Emails
export UI_URL= export UI_URL=
export EMAIL_URL= export EMAIL_URL=
export SENDER_EMAIL= export SENDER_EMAIL=
export REDIS_URL= # export REDIS_URL=
# export WORKERS_PROCESSES= # export WORKERS_PROCESSES=
# Workouts # Workouts
export TILE_SERVER_URL= # export TILE_SERVER_URL=
export MAP_ATTRIBUTION= # export MAP_ATTRIBUTION=
# export DEFAULT_STATICMAP=False # export DEFAULT_STATICMAP=False
export WEATHER_API_KEY= # export WEATHER_API_KEY=

View File

@ -85,7 +85,7 @@ class ProductionConfig(BaseConfig):
# https://docs.sqlalchemy.org/en/13/core/pooling.html#using-connection-pools-with-multiprocessing-or-os-fork # noqa # https://docs.sqlalchemy.org/en/13/core/pooling.html#using-connection-pools-with-multiprocessing-or-os-fork # noqa
SQLALCHEMY_ENGINE_OPTIONS = ( SQLALCHEMY_ENGINE_OPTIONS = (
{'poolclass': NullPool} {'poolclass': NullPool}
if os.getenv('DATABASE_DISABLE_POOLING', False) if os.getenv('DATABASE_DISABLE_POOLING', 'False') == 'True'
else {} else {}
) )
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL')