Add .env reading flow in config.php

Will check if there is a read_env_file.php and then run it to load .env
file in /configs folder

This file can hold secrets that are not to be checked into git

Updated edit.js file to be eslint compatible
This commit is contained in:
Clemens Schwaighofer
2021-10-11 09:40:01 +09:00
parent e0cc766cc7
commit b3d783bf63
9 changed files with 203 additions and 55 deletions

View File

@@ -13,15 +13,15 @@ declare(strict_types=1);
// please be VERY carefull only to change the right side
$DB_CONFIG = [
'test' => [
'db_name' => 'clemens',
'db_user' => 'clemens',
'db_pass' => 'clemens',
'db_host' => 'db.tokyo.tequila.jp',
'db_name' => $_ENV['DB_NAME_TEST'] ?? '',
'db_user' => $_ENV['DB_USER_TEST'] ?? '',
'db_pass' => $_ENV['DB_PASS_TEST'] ?? '',
'db_host' => $_ENV['DB_HOST_TEST'] ?? '',
'db_port' => 5432,
'db_schema' => 'public',
'db_type' => 'pgsql',
'db_encoding' => '',
'db_ssl' => 'disable' // allow, disable, require, prefer
'db_ssl' => 'allow' // allow, disable, require, prefer
],
];