Whenever I save the configs, the file configuration.php will be overwritten, which makes it impossible to adopt in a way, so that the values can be passed over from the environment variables.
Could you please add support for passing environment variables instead of saving values as strings in configuration.php? Maybe there could be a way to add an override config, which will be read after the actual configuration.php which determine (1) which values shouldn't be written in the config file when I save my changes and (2) providing a way to set parameter value programmatically.
Whenever I add "construct" function or try to use environment variable directly in the config, it will disappear after saving the changes in the backend.
Joomla 3 & 4
This would make my Joomla installation much easier to be deployed via GIT on a docker container
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Title |
|
You can write a plugin, which adds or removes options from the configuration.php. See line 912 (event onApplicationBeforeSave) in administrator/components/com_config/src/Model/ApplicationModel.php. Or do you need something else?
Labels |
Added:
Information Required
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-02-23 20:51:01 |
Closed_By | ⇒ | Quy |
Closing due to no response with additional info.
Can you give an example what do you exactly expect. I doubt the configuration.php file is the right place to store your variables there. I would rather go with a .env file.