This commit is contained in:
Juan Pablo Vial
2023-06-22 23:15:17 -04:00
parent 05e37f19ae
commit b212381bb7
25 changed files with 433 additions and 89 deletions

View File

@ -7,4 +7,3 @@ return [
'benchmark' => false,
'login_hours' => 5*24
];
?>

View File

@ -1,19 +1,24 @@
<?php
include_once dirname(__DIR__) . '/bootstrap/dotenv.php';
return [
'mysql' => [
'host' => $_ENV['MYSQL_HOST'],
//'port' => 3306,
'database' => $_ENV['MYSQL_DATABASE'],
'username' => $_ENV['MYSQL_USER'],
'password' => $_ENV['MYSQL_PASSWORD']
],
'mysql_copy' => [
'host' => 'localhost',
'database' => 'incoviba3',
'username' => 'incoviba',
'password' => $_ENV['MYSQL_PASSWORD']
]
]
?>
function buildDatabaseConfig(): array {
$arr = [
'mysql' => [
'host' => $_ENV['MYSQL_HOST'],
'database' => $_ENV['MYSQL_DATABASE'],
'username' => $_ENV['MYSQL_USER'],
'password' => $_ENV['MYSQL_PASSWORD']
],
'mysql_copy' => [
'host' => 'localhost',
'database' => 'incoviba3',
'username' => 'incoviba',
'password' => $_ENV['MYSQL_PASSWORD']
]
];
if (isset($_ENV['MYSQL_PORT'])) {
$arr['mysql']['port'] = $_ENV['MYSQL_PORT'];
}
return $arr;
}
return buildDatabaseConfig();