Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

1.2 Variables

Simon Hobbs edited this page Aug 12, 2019 · 28 revisions

This page documents the environment variables and other variables used in the platform - specifically ones that GovCMS has created. LAGOON_ and other variables are documented upstream.

If you see one of these variables in the wild, please ensure the documentation lives here, and update the variable to point to https://github.com/govCMS/govCMS/wiki. Do not point to this page as the link will break when the wiki title changes (this may be solved by improving the Wiki process later).

References to .env also include .env.default. (The .env takes precedence). Lagoon also looks at .lagoon.env and .lagoon.env.$BRANCH but we are rarely (if ever) utilising this.

References to "locally" are explicitly not relevant to Lagoon. But it does also refer to GitLab jobs as these use Docker Compose per local development. But bear in mind that GitLab variables can also be set through the GitLab UI. A reference to just .env you can assume it's used equally in all environments.

Variable Locations Description
COMPOSE_PROJECT_NAME .env locally Site name and prefix for all containers.
LAGOON_ENVIRONMENT_TYPE .env locally, Lagoon also sets Lagoon sets this to "development" or "production". Locally it's forced to "local". Used by scripts to make decisions.
LOCALDEV_URL .env locally Local development URL
VOLUME_FLAGS .env locally, OSX only File access in hosted volumes can be very slow on Mac due to issues with the filesystem. Using cached or delegated here can really speed things up on OSX.
STAGE_FILE_PROXY_URL .env Used by Drupal for the stage_file_proxy module. Point to alternate URL to ensure images and assets are available.
MARIADB_DATA_IMAGE .env A docker image containing a nightly database backup. The image must exist in the registry (currently). These registry images are refreshed nightly.
DEV_MODE .env locally Docker Compose uses this variable to turn on xdebug and other things (what?).
X_FRAME_OPTIONS .env Controls an nginx container setting. Setting to "SameOrigin" disallows embedding content (e.g via iFrame) from any external domain. Seckit click-jacking configuration needs to be configured in parallel to this setting.
GOVCMS_IMAGE_VERSION .env locally Controls which version of GovCMS images are used, eg govcmslagoon/cli:latest vs govcmslagoon/cli:7.3.2. If unset this defaults to latest. This currently is only controlled in Lagoon through GraphQL as it controls a Docker buildtime variable.