Docker - add volume and FLASK_ENV variable in fittrackee container

This commit is contained in:
Sam 2021-10-16 20:16:49 +02:00
parent 8cdb61dc60
commit 068869c8ed
2 changed files with 9 additions and 4 deletions

View File

@ -1,14 +1,13 @@
# Custom variables initialisation # Custom variables initialisation
# Application # Application
export FLASK_ENV=development
export FLASK_APP=fittrackee/__main__.py export FLASK_APP=fittrackee/__main__.py
# export HOST=
# export PORT=
export APP_SETTINGS=fittrackee.config.DevelopmentConfig export APP_SETTINGS=fittrackee.config.DevelopmentConfig
export APP_SECRET_KEY='just for test' export APP_SECRET_KEY='just for test'
# export APP_WORKERS= # export APP_WORKERS=
export APP_LOG=fittrackee.log export APP_LOG=fittrackee.log
export UPLOAD_FOLDER=/usr/src/app/uploads export UPLOAD_FOLDER=/uploads
# Database # Database
export DATABASE_URL=postgresql://fittrackee:fittrackee@fittrackee-db:5432/fittrackee export DATABASE_URL=postgresql://fittrackee:fittrackee@fittrackee-db:5432/fittrackee
@ -19,7 +18,7 @@ export DATABASE_TEST_URL=postgresql://fittrackee:fittrackee@fittrackee-db:5432/f
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

@ -26,6 +26,9 @@ services:
- fittrackee-db - fittrackee-db
- redis - redis
- mail - mail
volumes:
- .:/usr/src/app
- fittrackee_upload:/uploads:rw
fittrackee_client: fittrackee_client:
container_name: fittrackee_client container_name: fittrackee_client
@ -58,3 +61,6 @@ services:
ports: ports:
- "1025:1025" - "1025:1025"
- "8025:8025" - "8025:8025"
volumes:
fittrackee_upload: