From 068869c8ed202fbb36ff12256e3476f85994199d Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 16 Oct 2021 20:16:49 +0200 Subject: [PATCH] Docker - add volume and FLASK_ENV variable in fittrackee container --- .env.docker | 7 +++---- docker-compose-dev.yml | 6 ++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.env.docker b/.env.docker index c5a52aa5..85d36640 100644 --- a/.env.docker +++ b/.env.docker @@ -1,14 +1,13 @@ # Custom variables initialisation # Application +export FLASK_ENV=development export FLASK_APP=fittrackee/__main__.py -# export HOST= -# export PORT= export APP_SETTINGS=fittrackee.config.DevelopmentConfig export APP_SECRET_KEY='just for test' # export APP_WORKERS= export APP_LOG=fittrackee.log -export UPLOAD_FOLDER=/usr/src/app/uploads +export UPLOAD_FOLDER=/uploads # Database 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 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 diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 211f8568..b3ad83b0 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -26,6 +26,9 @@ services: - fittrackee-db - redis - mail + volumes: + - .:/usr/src/app + - fittrackee_upload:/uploads:rw fittrackee_client: container_name: fittrackee_client @@ -58,3 +61,6 @@ services: ports: - "1025:1025" - "8025:8025" + +volumes: + fittrackee_upload: \ No newline at end of file