mirror of
https://github.com/x86dev/docker-ttrss
synced 2025-12-13 01:46:00 +00:00
Added MySql option
This commit is contained in:
@@ -10,6 +10,11 @@ $conffile = $confpath . 'config.php';
|
||||
$ename = 'DB';
|
||||
$eport = 5432;
|
||||
|
||||
$db_type = env('DB_TYPE','pgsql');
|
||||
if ($db_type == 'mysql'){
|
||||
$eport = 3306;
|
||||
}
|
||||
|
||||
echo 'Configuring database for: ' . $conffile . PHP_EOL;
|
||||
|
||||
// check DB_NAME, which will be set automatically for a linked "db" container
|
||||
@@ -18,7 +23,7 @@ if (!env($ename . '_PORT', '')) {
|
||||
}
|
||||
|
||||
$config = array();
|
||||
$config['DB_TYPE'] = 'pgsql';
|
||||
$config['DB_TYPE'] = $db_type;
|
||||
$config['DB_HOST'] = env($ename . '_PORT_' . $eport . '_TCP_ADDR');
|
||||
$config['DB_PORT'] = env($ename . '_PORT_' . $eport . '_TCP_PORT');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user