From 074470c2c2cb451042d8252d224e447a694fd554 Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 5 Feb 2026 10:35:35 +0200 Subject: [PATCH] check _APP_MIGRATION_HOST --- src/Appwrite/Platform/Workers/Migrations.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index cfba5d0677..7030396eaa 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -336,8 +336,12 @@ class Migrations extends Action //$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https'; //$endpoint = $protocol . '://' . $platform['apiHostname'] . '/v1'; - $endpoint = 'http://localhost/v1'; - $endpoint = 'http://appwrite/v1'; + $host = System::getEnv('_APP_MIGRATION_HOST'); + if (empty($host)) { + throw new \Exception('_APP_MIGRATION_HOST is not set'); + } + + $endpoint = 'http://'.$host.'/v1'; try { $credentials = $migration->getAttribute('credentials', []);