From 6d7b3dc2d2183300e16c603395108f7746afcbd6 Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Tue, 9 Jan 2024 18:50:27 +0000 Subject: [PATCH 1/2] update doc dl frontend to use DOCUMENT_DOWNLOAD_HOST_NAME instead of server_name. this is now used on all hosted envs to work out cookie details - see https://github.com/alphagov/document-download-frontend/pull/205 for details. note: you will need to update your private doc dl frontend file to reflect the change in var name diff --git a/document-download-frontend.env.tmpl b/document-download-frontend.env.tmpl index b6f4412..a959450 100644 --- a/document-download-frontend.env.tmpl +++ b/document-download-frontend.env.tmpl @@ -4,7 +4,7 @@ FLASK_DEBUG=1 WERKZEUG_DEBUG_PIN=off NOTIFY_ENVIRONMENT=development -SERVER_NAME=frontend.document-download.localhost:7001 +DOCUMENT_DOWNLOAD_FRONTEND_HOST_NAME=frontend.document-download.localhost:7001 API_HOST_NAME=http://notify-api.localhost:6011 DOCUMENT_DOWNLOAD_API_HOST_NAME=http://api.document-download.localhost:7000 --- document-download-frontend.env.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/document-download-frontend.env.tmpl b/document-download-frontend.env.tmpl index b6f4412..a959450 100644 --- a/document-download-frontend.env.tmpl +++ b/document-download-frontend.env.tmpl @@ -4,7 +4,7 @@ FLASK_DEBUG=1 WERKZEUG_DEBUG_PIN=off NOTIFY_ENVIRONMENT=development -SERVER_NAME=frontend.document-download.localhost:7001 +DOCUMENT_DOWNLOAD_FRONTEND_HOST_NAME=frontend.document-download.localhost:7001 API_HOST_NAME=http://notify-api.localhost:6011 DOCUMENT_DOWNLOAD_API_HOST_NAME=http://api.document-download.localhost:7000 From f6939ee04b04b3d9f8d6affbbebee096d3f71182 Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Tue, 9 Jan 2024 18:53:13 +0000 Subject: [PATCH 2/2] give doc dl api redis --- docker-compose.yml | 4 ++++ document-download-api.env.tmpl | 2 ++ 2 files changed, 6 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 62346d8..644b261 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -183,7 +183,11 @@ services: - private/document-download-api.env environment: - ANTIVIRUS_ENABLED + depends_on: + redis: + condition: service_started networks: + redis: apps: aliases: - api.document-download.localhost diff --git a/document-download-api.env.tmpl b/document-download-api.env.tmpl index b8a9bb5..ae1fed8 100644 --- a/document-download-api.env.tmpl +++ b/document-download-api.env.tmpl @@ -8,6 +8,8 @@ SERVER_NAME=api.document-download.localhost:7000 FRONTEND_HOSTNAME=frontend.document-download.localhost:7001 DOCUMENT_DOWNLOAD_API_HOSTNAME=api.document-download.localhost:7000 +REDIS_URL=redis://redis:6379/1 + ANTIVIRUS_ENABLED=0 ANTIVIRUS_API_HOST=http://antivirus-api.localhost:6016