]> git.mxchange.org Git - friendica.git/commitdiff
use env variables in install wizard for values if available
authorne20002 <ne20002@gmx.ch>
Wed, 5 Feb 2025 14:56:05 +0000 (14:56 +0000)
committerne20002 <ne20002@gmx.ch>
Wed, 5 Feb 2025 14:56:05 +0000 (14:56 +0000)
src/Module/Install.php

index 80c3ff5addb961f5d2754a9ca5ca49ba07ed90a5..966cbf47c3efecfbab89992f4dc6653fbe96e107 100644 (file)
@@ -235,22 +235,22 @@ class Install extends BaseModule
                                        '$system_url'                => $this->configCache->get('system', 'url'),
                                        '$dbhost'                    => ['database-hostname',
                                                $this->t('Database Server Name'),
-                                               $this->configCache->get('database', 'hostname'),
+                                               $this->configCache->get('database', 'hostname') ? : getenv('MYSQL_HOST') ? : 'localhost',
                                                '',
                                                $this->t('Required')],
                                        '$dbuser' => ['database-username',
                                                $this->t('Database Login Name'),
-                                               $this->configCache->get('database', 'username'),
+                                               $this->configCache->get('database', 'username') ? : getenv('MYSQL_USER') ? : '',
                                                '',
                                                $this->t('Required'),
                                                'autofocus'],
                                        '$dbpass' => ['database-password',
                                                $this->t('Database Login Password'),
-                                               $this->configCache->get('database', 'password'),
+                                               $this->configCache->get('database', 'password') ? : getenv('MYSQL_PASSWORD') ? : '',
                                                $this->t("For security reasons the password must not be empty"),
                                                $this->t('Required')],
                                        '$dbdata' => ['database-database',
-                                               $this->t('Database Name'),
+                                               $this->t('Database Name') ? : getenv('MYSQL_DATABASE') ? : '',
                                                $this->configCache->get('database', 'database'),
                                                '',
                                                $this->t('Required')],