fix filter and mysql root password
This commit is contained in:
parent
7864b19232
commit
a2466956ec
|
@ -243,6 +243,15 @@ return [
|
|||
'question' => '',
|
||||
'filter' => 'password'
|
||||
],
|
||||
[
|
||||
'name' => '_APP_DB_ROOT_PASS',
|
||||
'description' => 'MariaDB server root password. Default value is: \'rootsecretpassword\'.',
|
||||
'introduction' => '',
|
||||
'default' => 'rootsecretpassword',
|
||||
'required' => false,
|
||||
'question' => '',
|
||||
'filter' => 'password'
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
|
|
|
@ -127,12 +127,20 @@ $cli
|
|||
|
||||
foreach($vars as $key => $var) {
|
||||
if(!empty($var['filter']) && ($interactive !== 'Y' || !Console::isInteractive())) {
|
||||
$input[$var['name']] = ($data && $var['default'] !== null)
|
||||
? $var['default']
|
||||
:( $var['filter'] === 'token'
|
||||
? Auth::tokenGenerator()
|
||||
: Auth::passwordGenerator());
|
||||
continue;
|
||||
if($data && $var['default'] !== null) {
|
||||
$input[$var['name']] = $var['default'];
|
||||
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') {
|
||||
$input[$var['name']] = $var['default'];
|
||||
|
|
|
@ -339,7 +339,7 @@ services:
|
|||
volumes:
|
||||
- appwrite-mariadb:/var/lib/mysql:rw
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=rootsecretpassword
|
||||
- MYSQL_ROOT_PASSWORD=${_APP_DB_ROOT_PASS}
|
||||
- MYSQL_DATABASE=${_APP_DB_SCHEMA}
|
||||
- MYSQL_USER=${_APP_DB_USER}
|
||||
- MYSQL_PASSWORD=${_APP_DB_PASS}
|
||||
|
|
Loading…
Reference in a new issue