diff --git a/app/tasks/install.php b/app/tasks/install.php index 483f5c5e04..0898ae67c1 100644 --- a/app/tasks/install.php +++ b/app/tasks/install.php @@ -73,7 +73,15 @@ $cli $compose = new Compose($data); $appwrite = $compose->getService('appwrite'); $oldVersion = ($appwrite) ? $appwrite->getImageVersion() : null; - $ports = $compose->getService('traefik')->getPorts(); + try { + $ports = $compose->getService('traefik')->getPorts(); + } catch (\Throwable $th) { + $ports = [ + $defaultHTTPPort => $defaultHTTPPort, + $defaultHTTPSPort => $defaultHTTPSPort + ]; + Console::warning('Traefik not found. Falling back to default ports.'); + } if($oldVersion) { foreach($compose->getServices() as $service) { // Fetch all env vars from previous compose file @@ -171,7 +179,7 @@ $cli ->setParam('organization', $organization) ->setParam('image', $image) ; - + $templateForEnv ->setParam('vars', $input) ;