fix filter and mysql root password
This commit is contained in:
parent
7864b19232
commit
a2466956ec
|
@ -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'
|
||||||
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|
|
@ -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'];
|
||||||
|
|
|
@ -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}
|
||||||
|
|
Loading…
Reference in a new issue