From 0f1af77ec0bc517ce8564e5c4c6246bfe522de8f Mon Sep 17 00:00:00 2001 From: Johan Bloemberg Date: Mon, 14 Oct 2024 15:20:06 +0200 Subject: [PATCH] Disable routinator services on development environment, rename profile only used for connectiontest --- docker/build.env | 2 +- docker/defaults.env | 2 +- docker/develop.env | 2 +- docker/docker-compose.yml | 5 ++++- documentation/Docker-deployment.md | 2 +- documentation/Docker-development-environment.md | 6 +++++- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docker/build.env b/docker/build.env index da3699f8e..64ed92b3e 100644 --- a/docker/build.env +++ b/docker/build.env @@ -2,7 +2,7 @@ # include all compose files COMPOSE_FILE=docker/docker-compose.yml:docker/docker-compose-development.yml:docker/docker-compose-integration-tests.yml:docker/docker-compose-test.yml:docker/docker-compose-tools.yml:docker/docker-compose-test-runner-develop.yml:docker/docker-compose-integration-tests.yml -COMPOSE_PROFILES=default,cron,batch,build +COMPOSE_PROFILES=connectiontest,cron,routinator,batch,build # don't expose HTTP(S) and DNS ports to the outside, this also causes issues due to being privileged ports WEBSERVER_PORT=80 diff --git a/docker/defaults.env b/docker/defaults.env index 515048a90..70194b467 100644 --- a/docker/defaults.env +++ b/docker/defaults.env @@ -125,7 +125,7 @@ COMPOSE_PROJECT_NAME=internetnl COMPOSE_FILE=docker/docker-compose.yml # enable all services and crons -COMPOSE_PROFILES=default,cron +COMPOSE_PROFILES=connectiontest,cron,routinator # interval for batch processing BATCH_SCHEDULER_INTERVAL=1 diff --git a/docker/develop.env b/docker/develop.env index 8dd204826..6d46109da 100644 --- a/docker/develop.env +++ b/docker/develop.env @@ -71,4 +71,4 @@ INTERNETNL_BRANDING=False NGINX_PROXY_CACHE=off # only enable application services -COMPOSE_PROFILES=default +COMPOSE_PROFILES=connectiontest diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 19bb7a127..4fd0f88ad 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -540,6 +540,9 @@ services: start_period: 30m retries: 10 + profiles: + - routinator + # unbound DNS server used for connection test unbound: image: ${DOCKER_IMAGE_UNBOUND:-${DOCKER_REGISTRY:-ghcr.io/internetstandards}/unbound:${RELEASE:-latest}} @@ -587,7 +590,7 @@ services: start_period: 1m retries: 10 profiles: - - default + - connectiontest # unbound resolver used for all DNS queries by app, worker, etc that needs to ignore DNSSEC errors and pass them on to the client resolver-permissive: diff --git a/documentation/Docker-deployment.md b/documentation/Docker-deployment.md index 9a26d27f8..cddde7b14 100644 --- a/documentation/Docker-deployment.md +++ b/documentation/Docker-deployment.md @@ -365,7 +365,7 @@ A Prometheus Alertmanager service is available but disabled by default. Enabling To enable and configure the Alertmanager add the following lines to `docker/local.env` and adjust the values to be applicable for your environment: - COMPOSE_PROFILES=default,cron,alertmanager + COMPOSE_PROFILES=connectiontest,cron,routinator,alertmanager ALERTMANAGER_MAIL_TO=rcpt1@example.com,rcpt2@example.com ALERTMANAGER_MAIL_FROM=noreply@example.com ALERTMANAGER_SMTP_HOST=smtp.example.com diff --git a/documentation/Docker-development-environment.md b/documentation/Docker-development-environment.md index 42d83dd6a..bf6d9a258 100644 --- a/documentation/Docker-development-environment.md +++ b/documentation/Docker-development-environment.md @@ -379,4 +379,8 @@ This project uses [Django Migrations](https://docs.djangoproject.com/en/4.2/topi ## Cron jobs -There are various cron jobs configured during normal deployments that perform tasks not cricital to the functionality of the application. These can however hinder development as they add additional activity to the application or cause changes like restarting workers. Because of this they are disabled in `develop` environment. You can temporary enable them by adding the line `COMPOSE_PROFILES=default,cron` to `docker/local.env`. +There are various cron jobs configured during normal deployments that perform tasks not cricital to the functionality of the application. These can however hinder development as they add additional activity to the application or cause changes like restarting workers. Because of this they are disabled in `develop` environment. You can temporary enable them by adding the line `COMPOSE_PROFILES=connectiontest,cron` to `docker/local.env`. + +## Routinator + +For the development environment the Routinator service/container is not started but instead an external routinator service is used. This reduces resource usage and wait time.