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

fix env variables on install

This commit is contained in:
Torsten Dittmann 2021-01-29 18:12:59 +01:00
parent 1ff1105703
commit a95c763e7e

View file

@ -30,7 +30,6 @@ $cli
* 5. Run docker-compose up -d - DONE
* 6. Run data migration
*/
$version = "0.7.0";
$config = Config::getParam('variables');
$path = '/usr/src/code/appwrite';
$defaultHTTPPort = '80';
@ -149,12 +148,19 @@ $cli
Console::exit(1);
}
$env = '';
$stdout = '';
$stderr = '';
Console::log("Running \"docker-compose -f {$path}/docker-compose.yml up -d --env-file={$path}/.env --remove-orphans --renew-anon-volumes\"");
foreach ($input as $key => $value) {
if($value) {
$env .= $key.'='.$value.' ';
}
}
$exit = Console::execute("docker-compose -f {$path}/docker-compose.yml up -d --env-file={$path}/.env --remove-orphans --renew-anon-volumes", '', $stdout, $stderr);
Console::log("Running \"docker-compose -f {$path}/docker-compose.yml up -d --remove-orphans --renew-anon-volumes\"");
$exit = Console::execute("${env} docker-compose -f {$path}/docker-compose.yml up -d --remove-orphans --renew-anon-volumes", '', $stdout, $stderr);
if ($exit !== 0) {
Console::error("Failed to install Appwrite dockers");