From 4491d7985cbfff777c55c810185846efa25e97b1 Mon Sep 17 00:00:00 2001 From: thenav56 Date: Tue, 3 Dec 2024 23:16:53 +0545 Subject: [PATCH 1/2] Add HCAPTCHA configs to docker-compose - Use test config for development --- backend | 2 +- docker-compose-prod.yml | 3 +++ docker-compose.yml | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/backend b/backend index 83c5f708..5c673b26 160000 --- a/backend +++ b/backend @@ -1 +1 @@ -Subproject commit 83c5f70874f63f2c8e4cc9786168294cd40b4b6e +Subproject commit 5c673b2604105ecb97a4c401a477b089d45c77ca diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index ef4e7094..f1415f1e 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -48,6 +48,9 @@ x-server: &base_server_setup # Static, Media configs DJANGO_STATIC_URL: ${DJANGO_STATIC_URL:-/dj-static/} DJANGO_MEDIA_URL: ${DJANGO_MEDIA_URL-/dj-media/} + # Misc + HCAPTCHA_SECRET: ${HCAPTCHA_SECRET?error} + HCAPTCHA_SITEKEY: ${HCAPTCHA_SITEKEY?error} volumes: - ./geographical_data/:/code/apps/cap_feed/geographical/ifrc-go-admin1-geojson/ - backend_data:/data/ diff --git a/docker-compose.yml b/docker-compose.yml index b9bda7c2..4ff82600 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,12 +32,16 @@ x-server: &base_server_setup # Redis config CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis:6379/0} CACHE_REDIS_URL: ${CACHE_REDIS_URL:-redis://redis:6379/1} + TEST_CACHE_REDIS_URL: ${TEST_CACHE_REDIS_URL:-redis://redis:6379/11} # Email config EMAIL_HOST: ${EMAIL_HOST:-mailpit} EMAIL_PORT: ${EMAIL_PORT:-1025} EMAIL_HOST_USER: ${EMAIL_HOST_USER:-mailpit} EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD:-mailpit} DEFAULT_FROM_EMAIL: ${DEFAULT_FROM_EMAIL:-alert-hub-dev } + # Misc + HCAPTCHA_SECRET: ${HCAPTCHA_SECRET:-0x0000000000000000000000000000000000000000} + HCAPTCHA_SITEKEY: ${HCAPTCHA_SITEKEY:-10000000-ffff-ffff-ffff-000000000001} volumes: - ./backend/:/code - backend_data:/data/ From edbca2067e10b1d19f50af7c44dbcf434e87ac0e Mon Sep 17 00:00:00 2001 From: barshathakuri Date: Thu, 1 Aug 2024 16:25:02 +0545 Subject: [PATCH 2/2] Add env to docker compose file --- docker-compose-prod.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index f1415f1e..7af4362a 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -101,6 +101,8 @@ services: APP_GRAPHQL_API_ENDPOINT: ${FRONTEND_APP_GRAPHQL_API_ENDPOINT?error} APP_MAPBOX_ACCESS_TOKEN: ${FRONTEND_APP_MAPBOX_ACCESS_TOKEN?error} APP_GRAPHQL_CODEGEN_ENDPOINT: ${FRONTEND_APP_GRAPHQL_CODEGEN_ENDPOINT?error} + env_file: + - .env command: | sh -c 'pnpm generate && pnpm build && rm -rf /client-build/* ; cp -r build/* /client-build/' volumes: