Skip to content

Commit

Permalink
Ensure development setup is performant in CI
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kasperg committed Nov 23, 2023
1 parent c1659c0 commit 3f7b4f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ services:
cli:
environment:
CI: true
LAGOON_ENVIRONMENT_TYPE: ci

php:
depends_on:
Expand All @@ -65,3 +66,4 @@ services:
http_proxy: http://wiremock:80
https_proxy: https://wiremock:443
CI: true
LAGOON_ENVIRONMENT_TYPE: ci
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3f7b4f3

Please sign in to comment.