stable

Clone or download

Read-only

feat(forge-config): DB host name loaded from env

Introduce the ability to define Tuleap configuration variables with environment variables, starting by `$sys_dbhost`. As stated in the corresponding story, the associated env var is TULEAP_SYS_DBHOST and at time of writing, it's only really testable in the context of CLI because there are environment clearing processes on php-fpm and systemd (for dev env) that prevent it's usage outside. This will be covered later on. In this commit we only focus on one DB param to introduce the logic. We propose to use #[ConfigKey] attribute to identify the variable. However DBConfig::class is not referenced in GetWhitelistedKeys event because we shouldn't allow to modify it with `config-set` (it's the purpose of the next commit). Part-of: story #22708 flexibility in the management of Tuleap Configuration Change-Id: I356e719d0cb4fd3ec89d1ab44a68ec9acae1261d

Modified Files

Name
M docker-compose.yml +2 −0 Go to diff View file
A src/common/Config/ConfigValueEnvironmentProvider.php +77 −0 Go to diff View file
M src/common/Config/ForgeConfig.php +7 −0 Go to diff View file
M src/common/DB/DBConfig.php +3 −0 Go to diff View file
M tests/unit/common/Config/ForgeConfigTest.php +25 −1 Go to diff View file