From 905972656ea10c399f8f971b96adbdcbd9460d1f Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Mon, 29 Nov 2021 22:31:17 +0000 Subject: [PATCH] Runs update.sh --- 20/apache/config/autoconfig.php | 14 ++++++++++++++ 20/fpm-alpine/config/autoconfig.php | 14 ++++++++++++++ 20/fpm/config/autoconfig.php | 14 ++++++++++++++ 21/apache/config/autoconfig.php | 14 ++++++++++++++ 21/fpm-alpine/config/autoconfig.php | 14 ++++++++++++++ 21/fpm/config/autoconfig.php | 14 ++++++++++++++ 22/apache/config/autoconfig.php | 14 ++++++++++++++ 22/fpm-alpine/config/autoconfig.php | 14 ++++++++++++++ 22/fpm/config/autoconfig.php | 14 ++++++++++++++ 9 files changed, 126 insertions(+) diff --git a/20/apache/config/autoconfig.php b/20/apache/config/autoconfig.php index f01f18d6..92ad2a1c 100644 --- a/20/apache/config/autoconfig.php +++ b/20/apache/config/autoconfig.php @@ -6,6 +6,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbtype'] = 'sqlite'; $AUTOCONFIG['dbname'] = getenv('SQLITE_DATABASE'); $autoconfig_enabled = true; +} elseif (getenv('MYSQL_DATABASE_FILE') && getenv('MYSQL_USER_FILE') && getenv('MYSQL_PASSWORD_FILE') && getenv('MYSQL_HOST')) { + $AUTOCONFIG['dbtype'] = 'mysql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('MYSQL_DATABASE_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('MYSQL_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('MYSQL_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); + $autoconfig_enabled = true; } elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) { $AUTOCONFIG['dbtype'] = 'mysql'; $AUTOCONFIG['dbname'] = getenv('MYSQL_DATABASE'); @@ -13,6 +20,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbpass'] = getenv('MYSQL_PASSWORD'); $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); $autoconfig_enabled = true; +} elseif (getenv('POSTGRES_DB_FILE') && getenv('POSTGRES_USER_FILE') && getenv('POSTGRES_PASSWORD_FILE') && getenv('POSTGRES_HOST')) { + $AUTOCONFIG['dbtype'] = 'pgsql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('POSTGRES_DB_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('POSTGRES_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('POSTGRES_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('POSTGRES_HOST'); + $autoconfig_enabled = true; } elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) { $AUTOCONFIG['dbtype'] = 'pgsql'; $AUTOCONFIG['dbname'] = getenv('POSTGRES_DB'); diff --git a/20/fpm-alpine/config/autoconfig.php b/20/fpm-alpine/config/autoconfig.php index f01f18d6..92ad2a1c 100644 --- a/20/fpm-alpine/config/autoconfig.php +++ b/20/fpm-alpine/config/autoconfig.php @@ -6,6 +6,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbtype'] = 'sqlite'; $AUTOCONFIG['dbname'] = getenv('SQLITE_DATABASE'); $autoconfig_enabled = true; +} elseif (getenv('MYSQL_DATABASE_FILE') && getenv('MYSQL_USER_FILE') && getenv('MYSQL_PASSWORD_FILE') && getenv('MYSQL_HOST')) { + $AUTOCONFIG['dbtype'] = 'mysql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('MYSQL_DATABASE_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('MYSQL_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('MYSQL_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); + $autoconfig_enabled = true; } elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) { $AUTOCONFIG['dbtype'] = 'mysql'; $AUTOCONFIG['dbname'] = getenv('MYSQL_DATABASE'); @@ -13,6 +20,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbpass'] = getenv('MYSQL_PASSWORD'); $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); $autoconfig_enabled = true; +} elseif (getenv('POSTGRES_DB_FILE') && getenv('POSTGRES_USER_FILE') && getenv('POSTGRES_PASSWORD_FILE') && getenv('POSTGRES_HOST')) { + $AUTOCONFIG['dbtype'] = 'pgsql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('POSTGRES_DB_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('POSTGRES_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('POSTGRES_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('POSTGRES_HOST'); + $autoconfig_enabled = true; } elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) { $AUTOCONFIG['dbtype'] = 'pgsql'; $AUTOCONFIG['dbname'] = getenv('POSTGRES_DB'); diff --git a/20/fpm/config/autoconfig.php b/20/fpm/config/autoconfig.php index f01f18d6..92ad2a1c 100644 --- a/20/fpm/config/autoconfig.php +++ b/20/fpm/config/autoconfig.php @@ -6,6 +6,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbtype'] = 'sqlite'; $AUTOCONFIG['dbname'] = getenv('SQLITE_DATABASE'); $autoconfig_enabled = true; +} elseif (getenv('MYSQL_DATABASE_FILE') && getenv('MYSQL_USER_FILE') && getenv('MYSQL_PASSWORD_FILE') && getenv('MYSQL_HOST')) { + $AUTOCONFIG['dbtype'] = 'mysql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('MYSQL_DATABASE_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('MYSQL_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('MYSQL_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); + $autoconfig_enabled = true; } elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) { $AUTOCONFIG['dbtype'] = 'mysql'; $AUTOCONFIG['dbname'] = getenv('MYSQL_DATABASE'); @@ -13,6 +20,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbpass'] = getenv('MYSQL_PASSWORD'); $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); $autoconfig_enabled = true; +} elseif (getenv('POSTGRES_DB_FILE') && getenv('POSTGRES_USER_FILE') && getenv('POSTGRES_PASSWORD_FILE') && getenv('POSTGRES_HOST')) { + $AUTOCONFIG['dbtype'] = 'pgsql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('POSTGRES_DB_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('POSTGRES_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('POSTGRES_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('POSTGRES_HOST'); + $autoconfig_enabled = true; } elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) { $AUTOCONFIG['dbtype'] = 'pgsql'; $AUTOCONFIG['dbname'] = getenv('POSTGRES_DB'); diff --git a/21/apache/config/autoconfig.php b/21/apache/config/autoconfig.php index f01f18d6..92ad2a1c 100644 --- a/21/apache/config/autoconfig.php +++ b/21/apache/config/autoconfig.php @@ -6,6 +6,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbtype'] = 'sqlite'; $AUTOCONFIG['dbname'] = getenv('SQLITE_DATABASE'); $autoconfig_enabled = true; +} elseif (getenv('MYSQL_DATABASE_FILE') && getenv('MYSQL_USER_FILE') && getenv('MYSQL_PASSWORD_FILE') && getenv('MYSQL_HOST')) { + $AUTOCONFIG['dbtype'] = 'mysql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('MYSQL_DATABASE_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('MYSQL_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('MYSQL_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); + $autoconfig_enabled = true; } elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) { $AUTOCONFIG['dbtype'] = 'mysql'; $AUTOCONFIG['dbname'] = getenv('MYSQL_DATABASE'); @@ -13,6 +20,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbpass'] = getenv('MYSQL_PASSWORD'); $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); $autoconfig_enabled = true; +} elseif (getenv('POSTGRES_DB_FILE') && getenv('POSTGRES_USER_FILE') && getenv('POSTGRES_PASSWORD_FILE') && getenv('POSTGRES_HOST')) { + $AUTOCONFIG['dbtype'] = 'pgsql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('POSTGRES_DB_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('POSTGRES_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('POSTGRES_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('POSTGRES_HOST'); + $autoconfig_enabled = true; } elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) { $AUTOCONFIG['dbtype'] = 'pgsql'; $AUTOCONFIG['dbname'] = getenv('POSTGRES_DB'); diff --git a/21/fpm-alpine/config/autoconfig.php b/21/fpm-alpine/config/autoconfig.php index f01f18d6..92ad2a1c 100644 --- a/21/fpm-alpine/config/autoconfig.php +++ b/21/fpm-alpine/config/autoconfig.php @@ -6,6 +6,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbtype'] = 'sqlite'; $AUTOCONFIG['dbname'] = getenv('SQLITE_DATABASE'); $autoconfig_enabled = true; +} elseif (getenv('MYSQL_DATABASE_FILE') && getenv('MYSQL_USER_FILE') && getenv('MYSQL_PASSWORD_FILE') && getenv('MYSQL_HOST')) { + $AUTOCONFIG['dbtype'] = 'mysql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('MYSQL_DATABASE_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('MYSQL_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('MYSQL_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); + $autoconfig_enabled = true; } elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) { $AUTOCONFIG['dbtype'] = 'mysql'; $AUTOCONFIG['dbname'] = getenv('MYSQL_DATABASE'); @@ -13,6 +20,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbpass'] = getenv('MYSQL_PASSWORD'); $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); $autoconfig_enabled = true; +} elseif (getenv('POSTGRES_DB_FILE') && getenv('POSTGRES_USER_FILE') && getenv('POSTGRES_PASSWORD_FILE') && getenv('POSTGRES_HOST')) { + $AUTOCONFIG['dbtype'] = 'pgsql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('POSTGRES_DB_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('POSTGRES_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('POSTGRES_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('POSTGRES_HOST'); + $autoconfig_enabled = true; } elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) { $AUTOCONFIG['dbtype'] = 'pgsql'; $AUTOCONFIG['dbname'] = getenv('POSTGRES_DB'); diff --git a/21/fpm/config/autoconfig.php b/21/fpm/config/autoconfig.php index f01f18d6..92ad2a1c 100644 --- a/21/fpm/config/autoconfig.php +++ b/21/fpm/config/autoconfig.php @@ -6,6 +6,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbtype'] = 'sqlite'; $AUTOCONFIG['dbname'] = getenv('SQLITE_DATABASE'); $autoconfig_enabled = true; +} elseif (getenv('MYSQL_DATABASE_FILE') && getenv('MYSQL_USER_FILE') && getenv('MYSQL_PASSWORD_FILE') && getenv('MYSQL_HOST')) { + $AUTOCONFIG['dbtype'] = 'mysql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('MYSQL_DATABASE_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('MYSQL_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('MYSQL_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); + $autoconfig_enabled = true; } elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) { $AUTOCONFIG['dbtype'] = 'mysql'; $AUTOCONFIG['dbname'] = getenv('MYSQL_DATABASE'); @@ -13,6 +20,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbpass'] = getenv('MYSQL_PASSWORD'); $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); $autoconfig_enabled = true; +} elseif (getenv('POSTGRES_DB_FILE') && getenv('POSTGRES_USER_FILE') && getenv('POSTGRES_PASSWORD_FILE') && getenv('POSTGRES_HOST')) { + $AUTOCONFIG['dbtype'] = 'pgsql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('POSTGRES_DB_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('POSTGRES_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('POSTGRES_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('POSTGRES_HOST'); + $autoconfig_enabled = true; } elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) { $AUTOCONFIG['dbtype'] = 'pgsql'; $AUTOCONFIG['dbname'] = getenv('POSTGRES_DB'); diff --git a/22/apache/config/autoconfig.php b/22/apache/config/autoconfig.php index f01f18d6..92ad2a1c 100644 --- a/22/apache/config/autoconfig.php +++ b/22/apache/config/autoconfig.php @@ -6,6 +6,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbtype'] = 'sqlite'; $AUTOCONFIG['dbname'] = getenv('SQLITE_DATABASE'); $autoconfig_enabled = true; +} elseif (getenv('MYSQL_DATABASE_FILE') && getenv('MYSQL_USER_FILE') && getenv('MYSQL_PASSWORD_FILE') && getenv('MYSQL_HOST')) { + $AUTOCONFIG['dbtype'] = 'mysql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('MYSQL_DATABASE_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('MYSQL_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('MYSQL_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); + $autoconfig_enabled = true; } elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) { $AUTOCONFIG['dbtype'] = 'mysql'; $AUTOCONFIG['dbname'] = getenv('MYSQL_DATABASE'); @@ -13,6 +20,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbpass'] = getenv('MYSQL_PASSWORD'); $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); $autoconfig_enabled = true; +} elseif (getenv('POSTGRES_DB_FILE') && getenv('POSTGRES_USER_FILE') && getenv('POSTGRES_PASSWORD_FILE') && getenv('POSTGRES_HOST')) { + $AUTOCONFIG['dbtype'] = 'pgsql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('POSTGRES_DB_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('POSTGRES_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('POSTGRES_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('POSTGRES_HOST'); + $autoconfig_enabled = true; } elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) { $AUTOCONFIG['dbtype'] = 'pgsql'; $AUTOCONFIG['dbname'] = getenv('POSTGRES_DB'); diff --git a/22/fpm-alpine/config/autoconfig.php b/22/fpm-alpine/config/autoconfig.php index f01f18d6..92ad2a1c 100644 --- a/22/fpm-alpine/config/autoconfig.php +++ b/22/fpm-alpine/config/autoconfig.php @@ -6,6 +6,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbtype'] = 'sqlite'; $AUTOCONFIG['dbname'] = getenv('SQLITE_DATABASE'); $autoconfig_enabled = true; +} elseif (getenv('MYSQL_DATABASE_FILE') && getenv('MYSQL_USER_FILE') && getenv('MYSQL_PASSWORD_FILE') && getenv('MYSQL_HOST')) { + $AUTOCONFIG['dbtype'] = 'mysql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('MYSQL_DATABASE_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('MYSQL_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('MYSQL_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); + $autoconfig_enabled = true; } elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) { $AUTOCONFIG['dbtype'] = 'mysql'; $AUTOCONFIG['dbname'] = getenv('MYSQL_DATABASE'); @@ -13,6 +20,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbpass'] = getenv('MYSQL_PASSWORD'); $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); $autoconfig_enabled = true; +} elseif (getenv('POSTGRES_DB_FILE') && getenv('POSTGRES_USER_FILE') && getenv('POSTGRES_PASSWORD_FILE') && getenv('POSTGRES_HOST')) { + $AUTOCONFIG['dbtype'] = 'pgsql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('POSTGRES_DB_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('POSTGRES_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('POSTGRES_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('POSTGRES_HOST'); + $autoconfig_enabled = true; } elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) { $AUTOCONFIG['dbtype'] = 'pgsql'; $AUTOCONFIG['dbname'] = getenv('POSTGRES_DB'); diff --git a/22/fpm/config/autoconfig.php b/22/fpm/config/autoconfig.php index f01f18d6..92ad2a1c 100644 --- a/22/fpm/config/autoconfig.php +++ b/22/fpm/config/autoconfig.php @@ -6,6 +6,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbtype'] = 'sqlite'; $AUTOCONFIG['dbname'] = getenv('SQLITE_DATABASE'); $autoconfig_enabled = true; +} elseif (getenv('MYSQL_DATABASE_FILE') && getenv('MYSQL_USER_FILE') && getenv('MYSQL_PASSWORD_FILE') && getenv('MYSQL_HOST')) { + $AUTOCONFIG['dbtype'] = 'mysql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('MYSQL_DATABASE_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('MYSQL_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('MYSQL_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); + $autoconfig_enabled = true; } elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) { $AUTOCONFIG['dbtype'] = 'mysql'; $AUTOCONFIG['dbname'] = getenv('MYSQL_DATABASE'); @@ -13,6 +20,13 @@ if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG['dbpass'] = getenv('MYSQL_PASSWORD'); $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); $autoconfig_enabled = true; +} elseif (getenv('POSTGRES_DB_FILE') && getenv('POSTGRES_USER_FILE') && getenv('POSTGRES_PASSWORD_FILE') && getenv('POSTGRES_HOST')) { + $AUTOCONFIG['dbtype'] = 'pgsql'; + $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('POSTGRES_DB_FILE'))); + $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('POSTGRES_USER_FILE'))); + $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('POSTGRES_PASSWORD_FILE'))); + $AUTOCONFIG['dbhost'] = getenv('POSTGRES_HOST'); + $autoconfig_enabled = true; } elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) { $AUTOCONFIG['dbtype'] = 'pgsql'; $AUTOCONFIG['dbname'] = getenv('POSTGRES_DB');