1
0
Fork 0
mirror of synced 2024-06-18 18:54:55 +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' => '',
'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) {
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'];

View file

@ -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}