mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
feat: hack for multi region
This commit is contained in:
parent
dad8f597ca
commit
900f64bf8d
1 changed files with 10 additions and 0 deletions
|
|
@ -136,6 +136,16 @@ App::post('/v1/projects')
|
||||||
$dsn = $databases[array_rand($databases)];
|
$dsn = $databases[array_rand($databases)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$dsns = [
|
||||||
|
'fra' => 'database_db_fra1_self_hosted_0_0',
|
||||||
|
'syd' => 'database_db_syd1_self_hosted_0_0',
|
||||||
|
'nyc' => 'database_db_nyc1_self_hosted_0_0',
|
||||||
|
];
|
||||||
|
|
||||||
|
if (isset($dsns[$region])) {
|
||||||
|
$dsn = $dsns[$region];
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Temporary until all projects are using shared tables.
|
// TODO: Temporary until all projects are using shared tables.
|
||||||
$sharedTables = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES', ''));
|
$sharedTables = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES', ''));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue