Environment Variables
The project relies on a number of Environment variables. This section will cover all variables and what they are used for.
OC variables
In some functionality there needs to be a general Open Content user that has access to all content of the project OC. An example of this functionality is the 404-redirect that lets us match urls that cause a 404 to migrated articles and redirect the user to the new url.
OC_URL - Only the domain should be used e.g. oc-public-imid.tryout.infomaker.io
OC_PORT - use port 8080
OC_USER - a user with read access to all content
OC_PASSWORD - password
App variables
There are som more general variables configure the application.
APP_ORGANISATION - Will be used to setup the customers Project plugin. This means that the menu item will be named after this variable.
APP_DEBUG - Will set the entire application in debug mode.
APP_ENV - Will set the state of your environment (local, testing, stage, prod)
APP_DOMAIN - Will set the
DOMAIN_CURRENT_SITE
constant in www/wp-config.php. Read more hereAPP_DEV_DOMAIN - Only used locally. Will act as default for the APP_DOMAIN variable.
Database variables
The database variables is used to setup the Wordpress database in www/wp-config.php.
DB_NAME - The name of the database for WordPress
DB_USER - MySQL database username
DB_PASSWORD - MySQL database password
DB_HOST - MySQL hostname
Available variables that should not be set unless good reason:
DB_CHARSET - MySQL charset. Read here
DB_COLLATE - MySQL database collation (i.e. the sort order of the character set). Read here
DB_TABLE_PREFIX - is the value placed in the front of your database tables. Read here
Read more about the Wordpress database constants here
Cloudfront variables
Everyware projects use Cloudfront for certain services and there are variables that defines those domains.
CF_IMENGINE - The Imengine url.
CF_PDF - The PDF CDN url.
CF_STATIC - The projects assets CDN e.g. "static domain"
Redis variables
Everyware projects uses the Redis Cache Plugin and it is configured through variables.
REDIS_OB_DEBUG - Disable graceful failures and throw exceptions.
REDIS_OB_DISABLED - Disable the object cache.
REDIS_OB_HOST - IP or hostname of the target server.
REDIS_OB_MAX_TTL - Set max time-to-live (in seconds) for cache keys with an expiration time of 0.
REDIS_OB_PORT - TCP/IP port of the target server.
REDIS_OB_PREFIX - Set the prefix for all cache keys.
Further information about configuration can be found here
Front Cache variables
FRONT_CACHE_TTL - Set max time-to-live (in seconds) for front cache keys
AWS IAM variables / credentials
StarterKit comes with WP Offload Media Lite Plugin that automatically copies images, videos, documents, and any other media added through WordPress’ media uploader to Amazon S3. In order to configure this, we need an IAM user.
AWS_ACCESS_KEY_ID - The access key from the IAM-user.
AWS_SECRET_KEY - The secret access key from the IAM-user.
These variables are maintained by the Naviga hosting team
AWS SES variables
StarterKit comes with WP Offload SES Plugin to connect the sites to Amazon SES.
AWS_SES_ACCESS_KEY_ID - The access key from the IAM-user. (Default:
AWS_ACCESS_KEY_ID
)AWS_SES_SECRET_KEY - The secret access key from the IAM-user. (Default:
AWS_SECRET_KEY
)AWS_SES_FROM - Changes the default email address used by WordPress
AWS_SES_RETURNPATH - Sets the "Return-Path" header used by Amazon SES.
AWS_SES_REPLYTO - Sets the "Reply-To" header for all outgoing emails
AWS_SES_ENDPOINT - Amazon SES region
These variables are maintained by the Naviga hosting team
Local Environment
These variables can be setup on a local environment as well. You will automatically get two env-files:
.env - is used to configure the local environment.
.env.example - is used to generate .env for new developers to the project. It will be versioned in the repository.
Last updated
Was this helpful?