Repository navigation
Configuring encore
Encore can be configured either by environment variables or by providing an application.yml config file. Details on how names of env variables relates to names in yaml config can be found in spring boot documentation
Some info on the most important configuration options can be found on the documentation site. The site is outdated though, so it may be necessary to confirm in the source code that a property mentioned has not changed.
Note that many of the configuration properties are not implemented directly in encore itself, but come from spring boot dependencies.
A list of spring boot application properties can be found at https://docs.spring.io/spring-boot/appendix/application-properties/index.html. The ones with spring.data.redis prefix are especially relevant for encore, as they are usually needed to configure access to redis cluster or sentinel.
Some of the most common env variables used for configuration.
| Variable | example value | description | Required |
|---|---|---|---|
| PROFILE_LOCATION | file:///path/to/profilesdir/profiles.yml | points to profiles.yml. Can be a file URL or http(s). Note that protocol needs to be included even when it points to a local file | YES |
| SPRING_DATA_REDIS_HOST | my-redis-host | ip/hostname of redis host | No (Defaults to localhost) |
| SPRING_DATA_REDIS_USER | user | Username for redis | No |
| SPRING_DATA_REDIS_PASSWORD | secretpassword | Password for redis | No |
| ENCORE_SETTING_CONCURRENCY | 1 | Sets how many 'job queues' the encore instances uses, and how many 'process slots' each instance has. Note that each processing slots only picks up jobs in a certain priority range. | No (default 2) |
| ENCORE_SETTINGS_SECURITY_ENABLED | true | Enables basic auth on encore API | No (defaults to false) |
| ENCORE_SETTINGS_SECURITY_USER_PASSWORD | {noop}some-password | Api password for user 'user', which has read access. Note that the '{noop}' prefix is not part of the password but shows that the password is not encrypted. An encrypted password can also be used, see the spring security documentation | |
| ENCORE_SETTINGS_SECURITY_ADMIN_PASSWORD | {noop}some-password | Api password for user 'user', which has read access. Note that the '{noop}' prefix is not part of the password but shows that the password is not encrypted.An encrypted password can also be used, , see the spring security documentation | |
| ENCORE_SETTINGS_POLL_DISABLED | false | Set to true for 'api-only' instance | |
| ENCORE_SETTINGS_SHARED_WORK_DIR | /mnt/shared | Should point to a directory that is mounted in the same path in all instances that process jobs | Only required when using chunked encoding |
| ENCORE_SETTINGS_POLL_DELAY | 500ms | Sets how often encore checks the queue for new jobs. For chunked encoding it can be useful to set it to a lower value, in the order of a few hundred milliseconds | No |
| SPRING_APPLICATION_JSON | {} | For more complex config (for instance audio mix presets) that require a map structure, the SPRING_APPLICATION_JSON env variable can be used to pass in json config similar to what would be put in application.yml | No |