Skip to main content

Environment variables

The commands read these variables from your shell first and from the project's .env file second. Git ignores .env, so it's the place for values that belong to your machine, such as the ports that start and browser-start save there.

Through a wrapper, .env wins

make and Ahoy load .env into the environment of every command, so through a wrapper a variable in .env wins over the same variable in your shell. To change a value that .env holds, edit .env, or run the tooling command directly.

Building​

VariableDefaultWhat it does
DRUPAL_VERSIONextra.eddy.drupal-version in composer.dev.json, or 11The Drupal version to build, such as 11, 11.1.0 or 11@beta. See Drupal versions.
DRUPAL_PROFILEstandardThe install profile that provision installs the site from.
GITHUB_TOKENUnsetA GitHub token that the build passes to Composer to get around API rate limits.
COMPOSER_AUTHBuilt from GITHUB_TOKENComposer credentials. A value you set is used as it is.
DEBUGUnset1 streams the full output of Composer, npm and Drush. See Debugging.

Webserver and site​

VariableDefaultWhat it does
WEBSERVER_HOSTlocalhostThe host the webserver listens on and the site URL names.
WEBSERVER_PORTThe first free port from 8000, saved to .envThe port of the webserver. See How the port is picked.
WEBSERVER_WAIT_TIMEOUT5Seconds that start waits for the webserver to accept connections. A whole number of 1 or more.
XDEBUGUnset1 starts the webserver with XDebug step-debugging. debug sets it for you.
CLOUDFLARE_TUNNELUnset1 exposes the site through a public Cloudflare quick tunnel. See Public tunnel.
TUNNEL_URLWritten to .env by startThe public URL of a tunnel, which the commands use as the site URL.
LOGIN_QRCODEUnsetWhen set, login also draws the login link as a QR code.

Testing​

VariableDefaultWhat it does
WEBDRIVER_BACKENDchromedriverThe browser for FunctionalJavascript tests: chromedriver drives your local Chrome, selenium a Docker container.
WEBDRIVER_PORTThe first free port from 4444, saved to .envThe port of the WebDriver endpoint.
WEBDRIVER_HOSTlocalhost, or host.docker.internal (macOS) or 172.17.0.1 with seleniumThe address the browser uses to reach the webserver.
SIMPLETEST_BASE_URLExported by make and AhoyThe site URL that Functional tests request.
SIMPLETEST_DBExported by make and AhoyThe database that Kernel and Functional tests install into.
BROWSERTEST_OUTPUT_DIRECTORYExported by make and AhoyWhere tests write their HTML pages and screenshots: .logs/browser_output.
MINK_DRIVER_ARGS_WEBDRIVERSet in phpunit.xmlThe browser and WebDriver endpoint of FunctionalJavascript tests. An exported value wins over the file.
SYMFONY_DEPRECATIONS_HELPERSet in phpunit.xmlHow tests treat deprecations. See Deprecated code.

Deployment​

CI reads these from the repository's Settings → Secrets and variables → Actions. Setting up deployment walks through them.

VariableSet asWhat it does
DEPLOY_REMOTESecretThe git remote to deploy to, such as git@git.drupal.org:project/myextension.git. Deployment is skipped until it's set.
DEPLOY_USER_NAMESecretThe name of the user who commits to the remote repository.
DEPLOY_USER_EMAILSecretThe email address of that user.
DEPLOY_SSH_KEYSecretThe private SSH key that pushes to the remote.
DEPLOY_PROCEEDSecret1 lets the deployment push. Any other value runs the job without pushing.
DEPLOY_BRANCHVariableThe branch to push to in the remote repository. Defaults to the branch that triggered the build.
DEPLOY_TAGWorkflowThe tag to deploy. The Deploy workflow sets it for a tag push, and eddy-deploy then pushes only that tag.
DEPLOY_SSH_KEY_FINGERPRINTOptionalLoads ~/.ssh/id_rsa_<fingerprint> into the SSH agent before the push, for a CI that installs keys by fingerprint. GitHub Actions doesn't need it.

Continuous integration​

VariableSet asWhat it does
CODECOV_TOKENSecretUploads code coverage to Codecov when it's set.
CI_<TOOL>_IGNORE_FAILUREVariable1 lets that lint or test step fail without failing its job. See Allowing a CI step to fail.