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. .env takes precedence. Lagoon also looks at .lagoon.env and .lagoon.env.$BRANCH but we are rarely (if ever) utilising this.

Variable Locations Description
COMPOSE_PROJECT_NAME Site/scaffold .env Site name and prefix for all containers.
LAGOON_ENVIRONMENT_TYPE .env locally and in Gitlab. Set by Lagoon in Lagoon 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
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.