diff --git a/.env b/.env index 9b4aef4ddd..ae4522c898 100644 --- a/.env +++ b/.env @@ -1,7 +1,7 @@ _APP_ENV=development _APP_EDITION=self-hosted _APP_LOCALE=en -_APP_REGION=fra +_APP_REGION=default _APP_WORKER_PER_CORE=6 _APP_COMPRESSION_MIN_SIZE_BYTES=1024 _APP_CONSOLE_WHITELIST_ROOT=disabled diff --git a/app/config/variables.php b/app/config/variables.php index 2f7a10221d..592d398062 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -9,9 +9,9 @@ return [ 'variables' => [ [ 'name' => '_APP_REGION', - 'description' => 'Set your server running geo region. By default, the var is set to \'fra\'.', + 'description' => 'Set your server running geo region. By default, the var is set to \'default\'.', 'introduction' => '', - 'default' => 'fra', + 'default' => 'default', 'required' => false, 'question' => '', 'filter' => '' diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 5099393e68..2f46c3c338 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -81,7 +81,7 @@ App::post('/v1/projects') ->param('projectId', '', new ProjectId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can\'t start with a special char. Max length is 36 chars.') ->param('name', null, new Text(128), 'Project name. Max length: 128 chars.') ->param('teamId', '', new UID(), 'Team unique ID.') - ->param('region', System::getEnv('_APP_REGION'), new Whitelist(array_keys(array_filter(Config::getParam('regions'), fn ($config) => !$config['disabled']))), 'Project Region.', true) + ->param('region', System::getEnv('_APP_REGION','default'), new Whitelist(array_keys(array_filter(Config::getParam('regions'), fn ($config) => !$config['disabled']))), 'Project Region.', true) ->param('description', '', new Text(256), 'Project description. Max length: 256 chars.', true) ->param('logo', '', new Text(1024), 'Project logo.', true) ->param('url', '', new URL(), 'Project URL.', true) diff --git a/src/Appwrite/Platform/Tasks/ScheduleBase.php b/src/Appwrite/Platform/Tasks/ScheduleBase.php index b62b95b066..b96fd5622f 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleBase.php +++ b/src/Appwrite/Platform/Tasks/ScheduleBase.php @@ -104,7 +104,7 @@ abstract class ScheduleBase extends Action } $results = $dbForPlatform->find('schedules', \array_merge($paginationQueries, [ - Query::equal('region', [System::getEnv('_APP_REGION')]), + Query::equal('region', [System::getEnv('_APP_REGION','default')]), Query::equal('resourceType', [static::getSupportedResource()]), Query::equal('active', [true]), ])); @@ -154,7 +154,7 @@ abstract class ScheduleBase extends Action } $results = $dbForPlatform->find('schedules', \array_merge($paginationQueries, [ - Query::equal('region', [System::getEnv('_APP_REGION')]), + Query::equal('region', [System::getEnv('_APP_REGION','default')]), Query::equal('resourceType', [static::getSupportedResource()]), Query::greaterThanEqual('resourceUpdatedAt', $lastSyncUpdate), ])); diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index e8195d175d..624948e2f5 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -183,7 +183,7 @@ class Deletes extends Action $this->listByGroup( 'schedules', [ - Query::equal('region', [System::getEnv('_APP_REGION')]), + Query::equal('region', [System::getEnv('_APP_REGION','default')]), Query::lessThanEqual('resourceUpdatedAt', $datetime), Query::equal('active', [false]), ],