Elefant can read its settings from environment variables, which can be useful for containerizing your Elefant app deployments. These settings by default include:
ELEFANT_ENV
- The base configuration file to load for the current environmentELEFANT_DB_DRIVER
- The database driver to use (e.g., sqlite, mysql)ELEFANT_DB_FILE
- The database file to read from (for SQLite)ELEFANT_DB_HOST
- The database host to connect toELEFANT_DB_NAME
- The database name to connect toELEFANT_DB_USER
- The database user to connect asELEFANT_DB_PASS
- The password of the user to connect to the database asELEFANT_TIMEZONE
- The timezone of the siteELEFANT_UDATES
- Whether to check for Elefant updates in the Elefant admin toolbarELEFANT_SITE_KEY
- A unique private key for CSRF token verificationELEFANT_SESSION_NAME
- What to name session cookiesELEFANT_SESSION_HANDLER
- Set the backend session storage handlerELEFANT_SESSION_DOMAIN
- The domain to limit session cookies toELEFANT_SESSION_DURATION
- The lifetime of a session cookieIf your environment variables are named differently, you can modify the conf/envmap.php
file to specify alternate environment variable names to look for. For example,
to read your database host name from MYSQL_HOST
, you would edit the following line:
ini
ELEFANT_DB_HOST = MYSQL_HOST