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

Latest commit

 

History

History
38 lines (32 loc) · 2.8 KB

environment_variables.md

File metadata and controls

38 lines (32 loc) · 2.8 KB

Environment Variables

Amazee.io exposes services to the web application by making use of environment variables.

Variable Content Example
AMAZEEIO Exists all the times (to tell if you are on an amazee.io environemnt or not) AMAZEEIO
AMAZEEIO_BASE_URL Full main URL (with http or https) of the current site. To be used for Drupal 7 $base_url setting, plus Drush $options['uri'] setting. http://mysite.com.develop.zh1.compact.amazee.io
AMAZEEIO_DB_HOST Database Hostname 127.0.0.1
AMAZEEIO_DB_USERNAME Autogenerated database username (will change automatically!) 9YX8soP9b7acN6FXM2Ho
AMAZEEIO_DB_PASSWORD Autogenerated database password (will change automatically!) rX3hy2MJRk27g82MkjZq
AMAZEEIO_DB_PORT Database Port 3306
AMAZEEIO_HASH_SALT Autogenerated Hash Salt for Drupal. Is the same accross multiple sites within a sitegroup 0e5b57dfc4d01959a40c2fcb16b1d785
AMAZEEIO_HOSTINGSTACK The stack identifier this site is running compact or cluster
AMAZEEIO_LOCATION System location (used for debugging purposes) digitalocean
AMAZEEIO_REDIS_PORT Redis port 6379
AMAZEEIO_REDIS_HOST Redis ip address) 127.0.0.1
AMAZEEIO_SITE_BRANCH The branch configured for your site prod
AMAZEEIO_SITE_ENVIRONMENT Environment Type production or development
AMAZEEIO_SITE_GROUP Sitegroup name mysite_com
AMAZEEIO_SITE_NAME Sitegroup name suffixed with branch mysite_com_prod
AMAZEEIO_SITE_URL Main URL (without http or https) of the current site. To be used for Drupal 8 $trusted_host_patterns setting. mysite.com.develop.zh1.compact.amazee.io
AMAZEEIO_SOLR_CORE Apache Solr Core name (only if Solr enabled for site) mysite_com
AMAZEEIO_SOLR_HOST Apache Solr Host (only if Solr enabled for site) 127.0.0.1
AMAZEEIO_SOLR_PORT Apache Solr Port (only if Solr enabled for site) 8149
AMAZEEIO_TMP_PATH Absolute path of temporary directory /var/www/mysite_com_prod/tmp
AMAZEEIO_VARNISH_HOSTS Varnish Hosts, comma separated if multiple (on cluster stacks) 10.144.64.15,10.144.64.16
AMAZEEIO_VARNISH_SECRET Varnish Secret (used to authenticate to Varnish for Commands like bans) 2PJt6hzzD-xmDYjHtpHaHe-Ld42sCCXpGaitQRg-6shG2q
AMAZEEIO_WEBROOT absolute path of the webroot inside the public_html directory /var/www/drupal/public_html/web or /var/www/drupal/public_html

Environment variables can be access from your web application by using PHP's getenv() function.

$database_username = getenv('AMAZEEIO_DB_USERNAME');

For examples on how to use these Environment variables, see: Settings.php Files