From 3f7b4f3a0d14cc99d6f22d5c4c97bd26d68fc238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Garn=C3=A6s?= Date: Thu, 23 Nov 2023 16:25:25 +0100 Subject: [PATCH] Ensure development setup is performant in CI The local environment type will do all kinds of stuff to support local development e.g. disabling caches and not aggregating assets. This in turn has a negative effect on performance which hurts us in CI. This is especially relevant for asset aggregation and Lighthouse scores. Instead of always using the local environment type we instead use local as a fallback. Lagoon may provide it on its own but in any case we provide a separate value for CI. This way our CI environments should stay performant and in this regard mimic a production setup. --- docker-compose.ci.yml | 2 ++ docker-compose.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index cb1d26bf0..64d620e27 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -57,6 +57,7 @@ services: cli: environment: CI: true + LAGOON_ENVIRONMENT_TYPE: ci php: depends_on: @@ -65,3 +66,4 @@ services: http_proxy: http://wiremock:80 https_proxy: https://wiremock:443 CI: true + LAGOON_ENVIRONMENT_TYPE: ci diff --git a/docker-compose.yml b/docker-compose.yml index 178ef996b..cf9a4de2d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,7 +30,7 @@ x-environment: # Environment variables which mimic what will be set in a Lagoon cluster locally LAGOON_PROJECT: 'dplcms' LAGOON_ENVIRONMENT: 'local' - LAGOON_ENVIRONMENT_TYPE: 'local' + LAGOON_ENVIRONMENT_TYPE: ${LAGOON_ENVIRONMENT_TYPE:-local} WEBROOT: web # Uncomment if you like to have the system behave like in production #LAGOON_ENVIRONMENT_TYPE: production