aboutsummaryrefslogtreecommitdiff
path: root/config/config_defaults.inc.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2024-05-06 09:21:07 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2024-05-06 09:21:07 +0000
commite2df6525b5b19f2ead4967630c437b89558afcf3 (patch)
treeca66753c52a488fd65e4685ba506511534ae44da /config/config_defaults.inc.php
parent06629e19ca03c3431a64302a18a1ff2a2f011be1 (diff)
allow setting configuration by environment variables, fixes #3560
Closes #3560 Merge request studip/studip!2875
Diffstat (limited to 'config/config_defaults.inc.php')
-rw-r--r--config/config_defaults.inc.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/config/config_defaults.inc.php b/config/config_defaults.inc.php
index 4a362ad..5901c24 100644
--- a/config/config_defaults.inc.php
+++ b/config/config_defaults.inc.php
@@ -10,10 +10,10 @@ please fill in your database connection settings.
*/
// default Stud.IP database (DB_Seminar)
-$DB_STUDIP_HOST = "localhost";
-$DB_STUDIP_USER = "";
-$DB_STUDIP_PASSWORD = "";
-$DB_STUDIP_DATABASE = "studip";
+$DB_STUDIP_HOST = $_ENV['MYSQL_HOST'] ?? 'localhost';
+$DB_STUDIP_USER = $_ENV['MYSQL_USER'] ?? '';
+$DB_STUDIP_PASSWORD = $_ENV['MYSQL_PASSWORD'] ?? '';
+$DB_STUDIP_DATABASE = $_ENV['MYSQL_DATABASE'] ?? 'studip';
$DEBUG_ALL_DB_QUERIES_WITH_TRACE = false;
/*
// optional Stud.IP slave database
@@ -66,9 +66,9 @@ $TMP_PATH ="/tmp"; //the system temp path
$MEDIA_CACHE_PATH = $STUDIP_BASE_PATH . '/data/media_cache';
//caching
-$CACHING_ENABLE = true;
+$CACHING_ENABLE = $_ENV['STUDIP_CACHING_ENABLE'] ?? true;
$CACHING_FILECACHE_PATH = $TMP_PATH . '/studip_cache';
-$CACHE_IS_SESSION_STORAGE = false; //store session data in cache
+$CACHE_IS_SESSION_STORAGE = $_ENV['STUDIP_CACHE_IS_SESSION_STORAGE'] ?? false; //store session data in cache
/*Stud.IP modules
----------------------------------------------------------------
@@ -159,7 +159,7 @@ $ELEARNING_INTERFACE_MODULES["loncapa"] =
]
];
-$PLUGINS_UPLOAD_ENABLE = TRUE; //Upload of Plugins is enabled
+$PLUGINS_UPLOAD_ENABLE = $_ENV['STUDIP_PLUGIN_UPLOAD_ENABLE'] ?? true; //Upload of Plugins is enabled
$PLUGIN_REPOSITORIES = [
'https://develop.studip.de/studip/plugins.php/pluginmarket/extern/xml',
@@ -193,7 +193,7 @@ sendmail use local sendmail script
qmail use local Qmail MTA
debug mails are only written to a file in $TMP_PATH
*/
-$MAIL_TRANSPORT = "smtp";
+$MAIL_TRANSPORT = $_ENV['STUDIP_MAIL_TRANSPORT'] ?? 'smtp';
/*smtp settings
----------------------------------------------------------------