mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Make config.php settings also available as environment variables (closes #118)
This commit is contained in:
@@ -138,6 +138,10 @@ function Setting(string $name, $value)
|
||||
{
|
||||
define('GROCY_' . $name, file_get_contents($settingOverrideFile));
|
||||
}
|
||||
elseif (getenv('GROCY_' . $name) !== false) // An environment variable with the same name and prefix GROCY_ overwrites the given setting
|
||||
{
|
||||
define('GROCY_' . $name, getenv('GROCY_' . $name));
|
||||
}
|
||||
else
|
||||
{
|
||||
define('GROCY_' . $name, $value);
|
||||
|
Reference in New Issue
Block a user