The environment variables have been grouped by bundles and for the Symfony framework itself.
Possible values: dev
, prod
, redis
, dev
, test
- Example
APP_ENV=dev
But there is 2 more possible values, specific to elasticms:
db
: It's equivalent to aprod
environment, but PHP sessions are persisted in the RDBMS (does not work with SQLite databases).redis
: It's equivalent to aprod
environment, but PHP sessions are saved in a Redis server.store_data
: It's equivalent to aprod
environment, but PHP sessions are saved in Store Data services.
A secret seed.
- Example
APP_SECRET=7b19a4a6e37b9303e4f6bca1dc6691ed
Default php://stdout
for local development you can change to %kernel.logs_dir%/%kernel.environment%.log
TRUSTED_PROXIES=127.0.0.1,127.0.0.2
TRUSTED_HOSTS=localhost,example.com
HTTP_CUSTOM_FORWARDED_PROTO=HTTP_X_COMPANY_FORWARDED_PROTO#Default value HTTP_X_FORWARDED_PROTO
HTTP_CUSTOM_FORWARDED_PORT=HTTP_X_COMPANY_FORWARDED_PORT#Default value HTTP_X_FORWARDED_PORT
HTTP_CUSTOM_FORWARDED_FOR=HTTP_X_COMPANY_FORWARDED_FOR#Default value HTTP_X_FORWARDED_FOR
HTTP_CUSTOM_FORWARDED_HOST=HTTP_X_COMPANY_FORWARDED_HOST#Default value HTTP_X_FORWARDED_HOST
If the reverse proxy's IP change all the time:
TRUSTED_PROXIES=127.0.0.1,REMOTE_ADDR
TRUSTED_HOSTS=localhost,example.com
HTTP_CUSTOM_FORWARDED_PROTO=HTTP_X_COMPANY_FORWARDED_PROTO#Default value HTTP_X_FORWARDED_PROTO
HTTP_CUSTOM_FORWARDED_PORT=HTTP_X_COMPANY_FORWARDED_PORT#Default value HTTP_X_FORWARDED_PORT
HTTP_CUSTOM_FORWARDED_FOR=HTTP_X_COMPANY_FORWARDED_FOR#Default value HTTP_CUSTOM_FORWARDED_FOR
HTTP_CUSTOM_FORWARDED_HOST=HTTP_X_COMPANY_FORWARDED_HOST#Default value HTTP_CUSTOM_FORWARDED_HOST
Configure Swift Mailer
Specify the maximum number of expected document for template, translation and route content types. Default value 1000
Default values (sqlite):
DB_DRIVER='sqlite'
DB_USER='user'
DB_PASSWORD='user'
DB_PORT='1234'
DB_NAME='app.db'
DB's host.
- Default value:
127.0.0.1
- Example:
DB_DRIVER='db-server.tl'
Driver (Type of the DB server). Accepted values are mysql
, pgsql
and sqlite
- Default value:
mysql
- Example:
DB_DRIVER='pgsql'
- Default value
user
- Example:
DB_USER='demo'
- Default value
user
- Example:
DB_PASSWORD='password'
For information the default mysql/mariadb port is 3306 and 5432 for Postgres
- Default value
3306
- Example:
DB_PORT='5432'
- Default value
elasticms
- Example:
DB_NAME='demo'
This variable is not used by Doctrine but by the dump script with postgres in the docker image of elasticms.
- Default value: not defined
- Example:
DB_SCEMA='schema_demo_adm'
Usefull when connecting to a string of multiple hosts. To reduce timeout when checking a second host if the first host fails. The minimum value is 2 https://pracucci.com/php-pdo-pgsql-connection-timeout.html
- Default value
30
- Example:
DB_CONNECTION_TIMEOUT=30
Should be defined only if Redis is defined as session manager.
REDIS_HOST=localhost
REDIS_PORT=6379
Url of a Tika server (string).
- Default value: empty string
- Example
EMSCO_TIKA_SERVER=http://tika:9998
Url or path to an Apache Tika jar file (string).
- Default value: http://apache.belnet.be/tika/tika-app-1.22.jar
- Example
EMSCO_TIKA_DOWNLOAD_URL=http://apache.belnet.be/tika/tika-app-1.22.jar'
EMSCO_PUBLIC_KEY
(mandatory): Path to a public key. The public key file needs to be in OpenSSH's format. It should look something like:ssh-rsa AAAAB3NzaC1yc2EAAA....NX6sqSnHA8= rsa-key-20121110
EMSCO_PRIVATE_KEY
(mandatory): Path to a private key.
Used to prefix all elasticsearch indexes and aliases managed by the current instance of elasticms.
- Example
EMSCO_INSTANCE_ID=demo_v1_
HTML used as title in the interface
- Default
<i class="ems-icon-ball"></i> elastic<b>ms</b>
- Example
EMSCO_NAME='<i class="ems-icon-ball"></i> My elasticms'
HTML used as short title in the interface
- Default
<i class="ems-icon-ball"></i><span class="sr-only">elasticms</span>
- Example
EMSCO_SHORTNAME='My-ems'
If set to true
an index will be created for each managed content types. You should avoid turning on this option as it will be deprecated soon.
- Default
false
- Example
EMSCO_SINGLE_TYPE_INDEX=false
Define the number of result per page in the search pages.
- Default
20
The color of the theme.
- Default
blue
- Possible values:
blue
indigo
purple
pink
red
orange
yellow
green
teal
cyan
white
gray
black
lightblue
navy
fuchsia
maroon
lime
olive
Format used to display dates in the interface. See PHP datetime format for available options.
- Default
j/m/Y \a\t G:i
Format used to display date in date pickers (See Java Simple Date Format.
- Default
dd/mm/yyyy
First day of the week in date pickers. 0
for Sunday, 1
for Monday, ... and 6
for Saterday.
- Default
1
Highlights some days of the week in date pickers. 0
for Sunday, 1
for Monday, ... and 6
for Saterday.
- Default
[0, 6]
Default values:
EMSCO_FROM_EMAIL_ADDRESS='[email protected]'
EMSCO_FROM_EMAIL_NAME='elasticms'
If set to true
user can perform a self registration
- Default
false
Used to defined multiple asset processor config.
- Default
[]
Example:
EMSCO_ASSET_CONFIG='{"preview":{"_config_type":"image","_width":300,"_height":200,"_resize":"fill","_radius":0,"_radius_geometry":["topleft","bottomright"]}}'
If set to true
new documents will have a OUUID generated before calling post-processors at first document's finalization.
If set to false
new documents will have a OUUID generated by elasticsearch during first indexation. So OUUIDs are not available for post-processors at first document's finalization.
- Default
false
Name of the content type used a circle.
- Default empty string (not defined)
- Example
EMSCO_CIRCLES_OBJECT=circle
If set to false
job initiated from the interface are executed on the spot. Use the ems:job:run
command to run pending jobs. It's recommended to schedule an ems:job:run
command and turn off this option.
- Default value
true
- Example
EMSCO_TRIGGER_JOB_FROM_WEB=false
Define the level of logs that will be saved in the elasticsearch ems_internal_logger_alias daily index. Default value: INFO
.
EMSCO_LOG_LEVEL=NOTICE
Define if the elastica logger must be turned off. Possible values are:
true
: the elastica logger is turn offfalse
: the elastic logger is active
EMSCO_LOG_BY_PASS=false
Define the default bulk size for commands such as the ems:environment:rebuild
command. Default value: 500
.
EMSCO_DEFAULT_BULK_SIZE=500
Define the limit where a resized image, with that max limit, will be generated on the client side in order to limit the memory consumption.
The resized image's hash will be available in a _image_resized_hash
attribute in the file field array (in case of a file field).
In a WYSIWYG field, the master file won't be uploaded, a resized image will be uploaded and directly used as src
attribute in the IMG
tag.
EMSCO_IMAGE_MAX_SIZE=2048
Define the url use by the user to access elasticms (in order to generate links in emails).
EMS_BACKEND_URL='http://admin.elasticms.local'
List of available locales supported by the client/channels i.e.: EMSCH_LOCALES=["en","fr","nl"]
Define the list of project's index prefixes, separated by a |
i.e. ='demo_pgsql_v1_'
, By default it sets to the EMSCO_INSTANCE_ID value.
Define the translation content type name. Default value label
i.e. EMSCH_TRANSLATION_TYPE='label'
Define the route content type name. Default value route
i.e. EMSCH_ROUTE_TYPE='route'
Define the template content type structure. Default value {"template": {"name": "name","code": "body"}}
i.e. EMSCH_TEMPLATES='{"template": {"name": "label","code": "body"}}'
Specify a local folder (in the public folder) where to locate emsch
assets. This is useful in development mode as the zip containing the assets is ignored.
Example base template.
<link rel="stylesheet" href="{{ asset('css/app.css', 'emsch') }}">
Overwrite the destination of the local files, by default emsch:local:*
commands will search in local/%environment_alias%
folder.
Example for locally loading the demo inside local elasticms-admin.
EMSCH_LOCAL_PATH='../demo/skeleton'
Define the log level (integer) where logs will be saved in DB:
- Default value: EMS_LOG_LEVEL='250'
Possible values:
- DEBUG (100): detailed debug information
- INFO (200) : interesting events. Examples: User logs in, SQL logs
- NOTICE (250): normal but significant events
- WARNING (300): exceptional occurrences that are not errors. Examples: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong
- ERROR (400): runtime errors that do not require immediate action but should typically be logged and monitored
- CRITICAL (500): critical conditions. Example: Application component unavailable, unexpected exception
- ALERT (550): action must be taken immediately. Example: Entire website down, database unavailable, etc. This should trigger phone call or SMS alerts and wake you up
- EMERGENCY (600): emergency: system is unusable
Define the [elasticsearch sniffing strategy](https://www.elastic.co/guide/en/elasticsearch/client/php-api/7.17/connection_pool.html:
- Default value: EMS_ELASTICSEARCH_CONNECTION_POOL='Elasticsearch\ConnectionPool\SimpleConnectionPool' if the EMS_ELASTICSEARCH_HOSTS contains one and only one host configuration; in order to avoid sniffing requests on a cluster that is more likely behind a reverse proxy. Else it contains EMS_ELASTICSEARCH_CONNECTION_POOL='Elasticsearch\ConnectionPool\SniffingConnectionPool'.
- Possible values:
- EMS_ELASTICSEARCH_CONNECTION_POOL='Elasticsearch\ConnectionPool\SimpleConnectionPool'
- EMS_ELASTICSEARCH_CONNECTION_POOL='Elasticsearch\ConnectionPool\SniffingConnectionPool'
- EMS_ELASTICSEARCH_CONNECTION_POOL='Elasticsearch\ConnectionPool\StaticConnectionPool'
- EMS_ELASTICSEARCH_CONNECTION_POOL='Elasticsearch\ConnectionPool\StaticNoPingConnectionPool'
Define the elasticsearch cluster as an array (JSON encoded) of hosts:
- Default value: EMS_ELASTICSEARCH_HOSTS='["http://localhost:9200"]'
If needed, this variable can also contain an elastica servers array:
EMS_ELASTICSEARCH_HOSTS='[{"transport":"Https","host":"elastic:fewl13@localhost","port":9200,"curl":{"64":false}}]'
In this example the cluster contains only one host accessible via HTTPS on the port 9200. But with the CURL option "64": false
the client doesn't check the validity of the host certificate
EMS_ELASTICSEARCH_HOSTS='[{"transport":"Https","host":"elastic:fewl13@localhost","port":9200,"curl":{"10065":"/opt/local/cacert.pem"}}]'
Here the client uses the /opt/local/cacert.pem
to validate the server certificate.
EMS_ELASTICSEARCH_HOSTS='[{"transport":"Https","host":"localhost","port":9200,"headers":{"Authorization":"Basic ZWxhc3RpYzpmZXdsMTM="},"curl":{"64":false}}]'
Another example with an extra HTTP header.
All PHP CURL integer identifier can be found on GitHub. More info on PHP.net.
Used to define storage services. Elasticms supports multiple types of storage services.
- Default value:
EMS_STORAGES='[{"type":"fs","path":".\/var\/assets"},{"type":"s3","credentials":[],"bucket":""},{"type":"db","activate":false},{"type":"http","base-url":"","auth-key":""},{"type":"sftp","host":"","path":"","username":"","public-key-file":"","private-key-file":""}]'
- Example:
EMS_STORAGES='[{"type":"fs","path":"./var/assets"},{"type":"fs","path":"/var/lib/elasticms"}]'
Refers to the PHP hash_algos function. Specify the algorithms to used in order to hash and identify files. It's also used to hash the document indexed in elasticsearch.
- Default value: EMS_HASH_ALGO='sha1'
Define backend elasticms url. CommonBundle provides a CoreApi instance.
Define backend authentication token. The commonBundle coreApi instance becomes authenticated.
Define extra headers for the API client, helpful for adding cookie header for xdebug.
EMS_CORE_API_HEADERS='{"Cookie":"XDEBUG_SESSION=PHPSTORM"}'
Define the max connections to the API client, when using async calls. By default it is set to 6
.
Adjust the API client's timeout. By default is set to 30
seconds, if you API request may take longueur (e.g. during migration) you can increase the timeout :
Define the verify_host
and verify_peer
for the api client, by default it is set to true
.
Define the ems cache type. Default value file_system
.
Allowed values: file_system
, apc
and redis
.
Unique required value per project, otherwise wipe storage will clear all cached values.
Use a different redis host for the common cache service. Default REDIS_HOST env variable.
Use a different redis port for the common cache service. Default REDIS_PORT env variable.
Default value false
, if true /metrics
is added to the routes.
Default value empty, symfony route host pattern for allow hosting on /metrics
Default value null, if defined will check the SERVER_PORT and throw 404 if not matching
Specify replacement strings, per locale to symbols. E.g. if you want to replace the symbol @
by the string at
in your slug in English and French : {"en":{"@":"at"},"fr":{"@":"at"}}
. Default value ~
(rely on the default Symfony configuration)
Define (JSON format) the store data services, in the priority order. See the Stora Data documentation for more details. Default value [{"type":"db"}]
Define (JSON format) a range of allowed ip address. Example: ["127.0.0.1", "::1", "192.168.0.1/24"]
Important the route /metrics
is not filtered.
Define (JSON format) a list of content type names to exclude from admin backup/restore commands. Example: ["route","template","template_ems","label"]
. Default value []
Define the hashcash difficuty for the form bundle. Set to 16384
by default.
Define the endpoints for the form bundle. Set to []
by default.
Define the load form JSON for the form bundle. Set to true
by default.
Define the cacheable for the form bundle. Set to true
by default.
Define the type for the form bundle. Set to form_instance
by default.
Define the connections for the submission bundle. Set to []
by default.
Define the default timeout for the submission bundle. Set to 10
by default.
If sets and refers to a Form entity, the corresponding form will be included in the User profile form (/user/edit/1). It's usefully in order to add extra parameters or attributes to a specific instance of elasticms. I.e. adding users working hours.
- EMS_WEBALIZE_REMOVABLE_REGEX : See EMS_SLUG_SYMBOL_MAP)
- EMS_WEBALIZE_DASHABLE_REGEX : See EMS_SLUG_SYMBOL_MAP)
- ELASTICSEARCH_CLUSTER : See EMS_ELASTICSEARCH_HOSTS
- ELASTICSEARCH_VERSION : This variable doesn't have any replacement, the value is directly get form the elasticsearch cluster itself.
- S3_BUCKET : See EMS_STORAGES
- S3_CREDENTIALS : See EMS_STORAGES
- STORAGE_FOLDER : See EMS_STORAGES
- EMS_SFTP_SERVEUR : See EMS_STORAGES
- EMS_SFTP_PATH : See EMS_STORAGES
- EMS_SFTP_USER : See EMS_STORAGES
- EMS_EMS_REMOTE_SERVER : See EMS_STORAGES
- EMS_EMS_REMOTE_AUTHKEY : See EMS_STORAGES
- EMS_SAVE_ASSETS_IN_DB : See EMS_STORAGES
- TIKA_SERVER : See EMSCO_TIKA_SERVER
- TIKA_DOWNLOAD_URL : See EMSCO_TIKA_DOWNLOAD_URL
- EMS_PRIVATE_KEY : See [EMSCO_PRIVATE_KEY](#Activate document signature)
- EMS_PUBLIC_KEY : See [EMSCO_PUBLIC_KEY](#Activate document signature)
- EMS_INSTANCE_ID : See EMSCO_INSTANCE_ID
- EMS_NAME : See EMSCO_NAME
- EMS_SHORTNAME : See EMSCO_SHORTNAME
- EMS_SINGLE_TYPE_INDEX : Not replaced
- EMSCO_SINGLE_TYPE_INDEX : Not replaced
- EMS_PAGING_SIZE : See EMSCO_PAGING_SIZE
- EMS_THEME_COLOR : See EMSCO_THEME_COLOR
- EMS_DATE_TIME_FORMAT : See EMSCO_DATE_TIME_FORMAT
- EMS_DATEPICKER_FORMAT : See EMSCO_DATEPICKER_FORMAT
- EMS_DATEPICKER_WEEKSTART : See EMSCO_DATEPICKER_WEEKSTART
- EMS_DATEPICKER_DAYSOFWEEK_HIGHLIGHTED : See EMSCO_DATEPICKER_DAYSOFWEEK_HIGHLIGHTED
- EMS_FROM_EMAIL_ADDRESS : See [EMSCO_FROM_EMAIL_ADDRESS](#From information for email sent)
- EMS_FROM_EMAIL_NAME : See [EMSCO_FROM_EMAIL_NAME](#From information for email sent)
- EMS_ALLOW_USER_REGISTRATION : See EMSCO_ALLOW_USER_REGISTRATION
- EMS_ASSET_CONFIG : See EMSCO_ASSET_CONFIG
- EMS_CIRCLES_OBJECT : See EMSCO_CIRCLES_OBJECT
- EMS_UPLOAD_FOLDER : Not replaced
- DATABASE_URL : See [Doctrine](#Doctrine variables))
- EMSCO_ASSET_CONFIG_TYPE : Not replaced
- EMSCO_ASSET_CONFIG_INDEX : Not replaced