1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-11-29 22:37:58 +02:00

support using files for SECRET_KEY and DB_PW

this enables usage of e.g. docker swarm secrets instead of exposing the
passwords directly via environment variables

just use DB_PW_FILE and SECRET_KEY_FILE instead of DB_PW and SECRET_KEY
This commit is contained in:
lub
2020-08-30 01:04:36 +02:00
parent 550065b043
commit 02cfe326d3
2 changed files with 11 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ $config = array();
// Generals
$config['db_dsnw'] = getenv('DB_DSNW');;
$config['temp_dir'] = '/tmp/';
$config['des_key'] = getenv('SECRET_KEY');
$config['des_key'] = getenv('SECRET_KEY') ? getenv('SECRET_KEY') : trim(file_get_contents(getenv('SECRET_KEY_FILE')));
$config['cipher_method'] = 'AES-256-CBC';
$config['identities_level'] = 0;
$config['reply_all_mode'] = 1;