1
0
Fork 0
mirror of synced 2024-06-27 02:31:04 +12:00

fix filter and mysql root password

This commit is contained in:
Damodar Lohani 2021-05-18 12:18:48 +05:45
parent 7864b19232
commit a2466956ec
3 changed files with 24 additions and 7 deletions

View file

@ -243,6 +243,15 @@ return [
'question' => '', 'question' => '',
'filter' => 'password' 'filter' => 'password'
], ],
[
'name' => '_APP_DB_ROOT_PASS',
'description' => 'MariaDB server root password. Default value is: \'rootsecretpassword\'.',
'introduction' => '',
'default' => 'rootsecretpassword',
'required' => false,
'question' => '',
'filter' => 'password'
],
], ],
], ],
[ [

View file

@ -127,12 +127,20 @@ $cli
foreach($vars as $key => $var) { foreach($vars as $key => $var) {
if(!empty($var['filter']) && ($interactive !== 'Y' || !Console::isInteractive())) { if(!empty($var['filter']) && ($interactive !== 'Y' || !Console::isInteractive())) {
$input[$var['name']] = ($data && $var['default'] !== null) if($data && $var['default'] !== null) {
? $var['default'] $input[$var['name']] = $var['default'];
:( $var['filter'] === 'token' continue;
? Auth::tokenGenerator() }
: Auth::passwordGenerator());
continue; if($var['filter'] === 'token') {
$input[$var['name']] = Auth::tokenGenerator();
continue;
}
if($var['filter'] === 'password') {
$input[$var['name']] = Auth::passwordGenerator();
continue;
}
} }
if(!$var['required'] || !Console::isInteractive() || $interactive !== 'Y') { if(!$var['required'] || !Console::isInteractive() || $interactive !== 'Y') {
$input[$var['name']] = $var['default']; $input[$var['name']] = $var['default'];

View file

@ -339,7 +339,7 @@ services:
volumes: volumes:
- appwrite-mariadb:/var/lib/mysql:rw - appwrite-mariadb:/var/lib/mysql:rw
environment: environment:
- MYSQL_ROOT_PASSWORD=rootsecretpassword - MYSQL_ROOT_PASSWORD=${_APP_DB_ROOT_PASS}
- MYSQL_DATABASE=${_APP_DB_SCHEMA} - MYSQL_DATABASE=${_APP_DB_SCHEMA}
- MYSQL_USER=${_APP_DB_USER} - MYSQL_USER=${_APP_DB_USER}
- MYSQL_PASSWORD=${_APP_DB_PASS} - MYSQL_PASSWORD=${_APP_DB_PASS}