From b36a4cf2211d34bbebae263c676bd630b3e595ad Mon Sep 17 00:00:00 2001 From: Fmstrat Date: Mon, 18 Oct 2021 10:26:37 -0400 Subject: [PATCH 1/4] Docker updates for full files --- .env.docker | 2 +- .gitignore | 3 +++ docker-compose-dev.yml | 10 +++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.env.docker b/.env.docker index 85d36640..7197daf1 100644 --- a/.env.docker +++ b/.env.docker @@ -7,7 +7,7 @@ export APP_SETTINGS=fittrackee.config.DevelopmentConfig export APP_SECRET_KEY='just for test' # export APP_WORKERS= export APP_LOG=fittrackee.log -export UPLOAD_FOLDER=/uploads +export UPLOAD_FOLDER=/usr/src/apps/uploads # Database export DATABASE_URL=postgresql://fittrackee:fittrackee@fittrackee-db:5432/fittrackee diff --git a/.gitignore b/.gitignore index e9abf67e..6f4c82ec 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,6 @@ yarn-error.log* ############### *.log nohup.out + +# docker +data diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index b3ad83b0..3e884d31 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -10,7 +10,9 @@ services: environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - + volumes: + - ./data/db:/var/lib/postgresql/data + fittrackee: container_name: fittrackee build: . @@ -28,7 +30,8 @@ services: - mail volumes: - .:/usr/src/app - - fittrackee_upload:/uploads:rw + - ./data/workouts:/usr/src/app/workouts + - ./data/uploads:/usr/src/app/uploads fittrackee_client: container_name: fittrackee_client @@ -61,6 +64,3 @@ services: ports: - "1025:1025" - "8025:8025" - -volumes: - fittrackee_upload: \ No newline at end of file From 007bc81581a7f6d30d2f7ee937a60729cfac4339 Mon Sep 17 00:00:00 2001 From: Fmstrat Date: Mon, 18 Oct 2021 11:28:48 -0400 Subject: [PATCH 2/4] Moved -d to allow for run --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 59658af9..5494f81a 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ docker-run-workers: docker-compose -f docker-compose-dev.yml exec -d fittrackee docker/run-workers.sh docker-serve-client: - docker-compose -f docker-compose-dev.yml up fittrackee_client -d + docker-compose -f docker-compose-dev.yml up -d fittrackee_client docker-compose -f docker-compose-dev.yml exec fittrackee_client react-scripts start docker-shell: From 6a87803b5fb997c3ab929c7883cc7fb0226ba926 Mon Sep 17 00:00:00 2001 From: Fmstrat Date: Mon, 18 Oct 2021 11:54:20 -0400 Subject: [PATCH 3/4] Update ENV and fix CORS --- .env.docker | 2 +- docker-compose-dev.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.docker b/.env.docker index 7197daf1..53314858 100644 --- a/.env.docker +++ b/.env.docker @@ -7,7 +7,7 @@ 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/apps/uploads +export UPLOAD_FOLDER=/usr/src/app/uploads # Database export DATABASE_URL=postgresql://fittrackee:fittrackee@fittrackee-db:5432/fittrackee diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 3e884d31..e6811b90 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -37,7 +37,7 @@ services: container_name: fittrackee_client environment: - NODE_ENV=development - - REACT_APP_API_URL=http://0.0.0.0:5000 + - REACT_APP_API_URL=http://localhost:5000 build: context: ./fittrackee_client volumes: From 88c4bab64d1f994e87e6e84cdb812d9d88c6d696 Mon Sep 17 00:00:00 2001 From: Fmstrat Date: Mon, 18 Oct 2021 13:33:13 -0400 Subject: [PATCH 4/4] Added data to dockerignore --- .dockerignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index fdd3ba35..db3149ba 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,4 +8,5 @@ .eslintcache docker-compose-dev.yml Makefile.custom.config -*.log \ No newline at end of file +*.log +data \ No newline at end of file