|
6 | 6 | $AUTOCONFIG['dbtype'] = 'sqlite'; |
7 | 7 | $AUTOCONFIG['dbname'] = getenv('SQLITE_DATABASE'); |
8 | 8 | $autoconfig_enabled = true; |
9 | | -} elseif (getenv('MYSQL_DATABASE_FILE') && getenv('MYSQL_USER_FILE') && getenv('MYSQL_PASSWORD_FILE') && getenv('MYSQL_HOST')) { |
10 | | - $AUTOCONFIG['dbtype'] = 'mysql'; |
11 | | - $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('MYSQL_DATABASE_FILE'))); |
12 | | - $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('MYSQL_USER_FILE'))); |
13 | | - $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('MYSQL_PASSWORD_FILE'))); |
14 | | - $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); |
15 | | - $autoconfig_enabled = true; |
16 | 9 | } elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) { |
17 | 10 | $AUTOCONFIG['dbtype'] = 'mysql'; |
18 | 11 | $AUTOCONFIG['dbname'] = getenv('MYSQL_DATABASE'); |
19 | 12 | $AUTOCONFIG['dbuser'] = getenv('MYSQL_USER'); |
20 | 13 | $AUTOCONFIG['dbpass'] = getenv('MYSQL_PASSWORD'); |
21 | 14 | $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); |
22 | 15 | $autoconfig_enabled = true; |
23 | | -} elseif (getenv('POSTGRES_DB_FILE') && getenv('POSTGRES_USER_FILE') && getenv('POSTGRES_PASSWORD_FILE') && getenv('POSTGRES_HOST')) { |
24 | | - $AUTOCONFIG['dbtype'] = 'pgsql'; |
25 | | - $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('POSTGRES_DB_FILE'))); |
26 | | - $AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('POSTGRES_USER_FILE'))); |
27 | | - $AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('POSTGRES_PASSWORD_FILE'))); |
28 | | - $AUTOCONFIG['dbhost'] = getenv('POSTGRES_HOST'); |
29 | | - $autoconfig_enabled = true; |
30 | 16 | } elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) { |
31 | 17 | $AUTOCONFIG['dbtype'] = 'pgsql'; |
32 | 18 | $AUTOCONFIG['dbname'] = getenv('POSTGRES_DB'); |
|
0 commit comments