Configurations¶
OS environment variables¶
PROFILE_ENV¶
Default value: None (not defined).
Define the environment profile for the current process, such as DEV | STG | PRD.
This is usually used to decide which config file in ${DIR_CONFIG} should be used as the entrypoint config.
If this environment variable is defined, aloha will first search for main-${PROFILE_ENV}.conf; otherwise it uses main.conf.
[!NOTE] Backward Compatibility & Deprecation Notice: If
PROFILE_ENVis not defined or has no value,alohafalls back to reading the legacyENV_PROFILEenvironment variable. IfENV_PROFILEis present, aDeprecationWarningwill be emitted.ENV_PROFILEis deprecated and support will be removed in a future release. Please migrate toPROFILE_ENV.
ENTRYPOINT¶
Default value: None (not defined).
Define the entrypoint Python module when using aloha start to start a service/process.
It is equivalent to aloha start ${ENTRYPOINT}.
The specified Python module must contain a main() function.
APP_MODULE¶
Default value: default.
Define the application module name. It is mapped to config variable APP_MODULE and used as the prefix for log files.
DIR_LOG¶
Default value: logs.
Define where log files are stored.
deploy.log_format_file¶
Default value: json.
Select the predefined format for log files. Supported values are plain and json.
deploy.log_format_stream¶
Default value: plain.
Select the predefined format for terminal streams (stderr/stdout). Supported values are plain and json; the plain format colors the level prefix when writing to a TTY.
DIR_RESOURCE¶
Default value: resource under the current working directory.
Define the resource folder. It will be used as the root directory by aloha.config.paths.get_resource_dir().
DIR_CONFIG¶
Default value: ${DIR_RESOURCE}/config.
Define where to find configuration files.
FILES_CONFIG¶
Default value: None (not defined).
Optional. Define a comma-separated list of config files to load.
If this variable is set, PROFILE_ENV (and legacy ENV_PROFILE) is ignored.