No Code Attached Yet Information Required
avatar vitali-korezki
vitali-korezki
31 Jan 2022

Steps to reproduce the issue

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.

Expected result

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.

Actual result

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.

System information (as much as possible)

Joomla 3 & 4

Additional comments

This would make my Joomla installation much easier to be deployed via GIT on a docker container

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar vitali-korezki vitali-korezki - open - 31 Jan 2022
avatar vitali-korezki vitali-korezki - change - 31 Jan 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 31 Jan 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 31 Jan 2022
avatar vitali-korezki vitali-korezki - change - 31 Jan 2022
Title
Feature Request: Reading configurations from environment parameters
Support for Environment Variables in configuration.php
avatar vitali-korezki vitali-korezki - edited - 31 Jan 2022
avatar laoneo
laoneo - comment - 4 Feb 2022

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.

avatar Hackwar
Hackwar - comment - 4 Feb 2022

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?

avatar Quy Quy - change - 13 Feb 2022
Labels Added: Information Required
avatar Quy Quy - labeled - 13 Feb 2022
avatar Quy Quy - change - 23 Feb 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-02-23 20:51:01
Closed_By Quy
avatar Quy Quy - close - 23 Feb 2022
avatar Quy
Quy - comment - 23 Feb 2022

Closing due to no response with additional info.

Add a Comment

Login with GitHub to post a comment