diff --git a/.env.docker b/.env.docker index 49f50803..c5a52aa5 100644 --- a/.env.docker +++ b/.env.docker @@ -13,17 +13,17 @@ export UPLOAD_FOLDER=/usr/src/app/uploads # Database export DATABASE_URL=postgresql://fittrackee:fittrackee@fittrackee-db:5432/fittrackee export DATABASE_TEST_URL=postgresql://fittrackee:fittrackee@fittrackee-db:5432/fittrackee_test -export DATABASE_DISABLE_POOLING= +# export DATABASE_DISABLE_POOLING= # Emails export UI_URL=http://0.0.0.0:5000 export EMAIL_URL=smtp://none:none@mail:1025 export SENDER_EMAIL=fittrackee@example.com -export REDIS_URL=redis://redis:6379 +# export REDIS_URL=redis://redis:6379 export WORKERS_PROCESSES=2 # Workouts -#export TILE_SERVER_URL= -#export MAP_ATTRIBUTION= -#export DEFAULT_STATICMAP=False -#export WEATHER_API_KEY= \ No newline at end of file +# export TILE_SERVER_URL= +# export MAP_ATTRIBUTION= +# export DEFAULT_STATICMAP=False +# export WEATHER_API_KEY= \ No newline at end of file diff --git a/.env.example b/.env.example index 5a984c54..adc1939f 100644 --- a/.env.example +++ b/.env.example @@ -6,24 +6,24 @@ # export HOST= # export PORT= # export APP_SETTINGS=fittrackee.config.ProductionConfig -export APP_SECRET_KEY= +export APP_SECRET_KEY='please change me' # export APP_WORKERS= export APP_LOG=fittrackee.log export UPLOAD_FOLDER= # Database # export DATABASE_URL=postgresql://fittrackee:fittrackee@${HOST}:5432/fittrackee -export DATABASE_DISABLE_POOLING= +# export DATABASE_DISABLE_POOLING= # Emails export UI_URL= export EMAIL_URL= export SENDER_EMAIL= -export REDIS_URL= +# export REDIS_URL= # export WORKERS_PROCESSES= # Workouts -export TILE_SERVER_URL= -export MAP_ATTRIBUTION= -#export DEFAULT_STATICMAP=False -export WEATHER_API_KEY= +# export TILE_SERVER_URL= +# export MAP_ATTRIBUTION= +# export DEFAULT_STATICMAP=False +# export WEATHER_API_KEY= diff --git a/fittrackee/config.py b/fittrackee/config.py index d1bbd7f2..e87d91e3 100644 --- a/fittrackee/config.py +++ b/fittrackee/config.py @@ -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 SQLALCHEMY_ENGINE_OPTIONS = ( {'poolclass': NullPool} - if os.getenv('DATABASE_DISABLE_POOLING', False) + if os.getenv('DATABASE_DISABLE_POOLING', 'False') == 'True' else {} ) SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL')