Merge branch '1.5.x' into providers-from-attribute
This commit is contained in:
commit
9545e4ac72
10 changed files with 40 additions and 19 deletions
1
.github/workflows/publish.yml
vendored
1
.github/workflows/publish.yml
vendored
|
@ -16,7 +16,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
ref: cl-1.4.x
|
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
# Version 1.4.7
|
||||||
|
|
||||||
|
## Fixes
|
||||||
|
- Fix missing body in async function execution in [#6988](https://github.com/appwrite/appwrite/pull/6988)
|
||||||
|
|
||||||
# Version 1.4.6
|
# Version 1.4.6
|
||||||
|
|
||||||
## Changes
|
## Changes
|
||||||
|
|
|
@ -89,7 +89,7 @@ $ git push origin [name_of_your_new_branch]
|
||||||
|
|
||||||
To set up a working **development environment**, just fork the project git repository and install the backend and frontend dependencies using the proper package manager and create run the docker-compose stack.
|
To set up a working **development environment**, just fork the project git repository and install the backend and frontend dependencies using the proper package manager and create run the docker-compose stack.
|
||||||
|
|
||||||
> If you just want to install Appwrite for day-to-day use and not as a contributor, you can reference the [installation guide](https://github.com/appwrite/appwrite#installation), the [getting started guide](https://appwrite.io/docs/getting-started-for-web), or the main [README](README.md) file.
|
> If you just want to install Appwrite for day-to-day use and not as a contributor, you can reference the [installation guide](https://github.com/appwrite/appwrite#installation), the [getting started guide](https://appwrite.io/docs/quick-starts), or the main [README](README.md) file.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone git@github.com:[YOUR_FORK_HERE]/appwrite.git
|
git clone git@github.com:[YOUR_FORK_HERE]/appwrite.git
|
||||||
|
@ -454,7 +454,7 @@ From time to time, our team will add tutorials that will help contributors find
|
||||||
|
|
||||||
- [Adding Support for a New OAuth2 Provider](./docs/tutorials/add-oauth2-provider.md)
|
- [Adding Support for a New OAuth2 Provider](./docs/tutorials/add-oauth2-provider.md)
|
||||||
- [Appwrite Environment Variables](./docs/tutorials/add-environment-variable.md)
|
- [Appwrite Environment Variables](./docs/tutorials/add-environment-variable.md)
|
||||||
- [Running in Production](https://appwrite.io/docs/production)
|
- [Running in Production](https://appwrite.io/docs/advanced/self-hosting/production)
|
||||||
- [Adding Storage Adapter](./docs/tutorials/add-storage-adapter.md)
|
- [Adding Storage Adapter](./docs/tutorials/add-storage-adapter.md)
|
||||||
|
|
||||||
## Other Ways to Help
|
## Other Ways to Help
|
||||||
|
|
|
@ -66,7 +66,7 @@ docker run -it --rm \
|
||||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||||
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
|
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
|
||||||
--entrypoint="install" \
|
--entrypoint="install" \
|
||||||
appwrite/appwrite:1.4.6
|
appwrite/appwrite:1.4.7
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
@ -78,7 +78,7 @@ docker run -it --rm ^
|
||||||
--volume //var/run/docker.sock:/var/run/docker.sock ^
|
--volume //var/run/docker.sock:/var/run/docker.sock ^
|
||||||
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
|
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
|
||||||
--entrypoint="install" ^
|
--entrypoint="install" ^
|
||||||
appwrite/appwrite:1.4.6
|
appwrite/appwrite:1.4.7
|
||||||
```
|
```
|
||||||
|
|
||||||
#### PowerShell
|
#### PowerShell
|
||||||
|
@ -88,7 +88,7 @@ docker run -it --rm `
|
||||||
--volume /var/run/docker.sock:/var/run/docker.sock `
|
--volume /var/run/docker.sock:/var/run/docker.sock `
|
||||||
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
|
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
|
||||||
--entrypoint="install" `
|
--entrypoint="install" `
|
||||||
appwrite/appwrite:1.4.6
|
appwrite/appwrite:1.4.7
|
||||||
```
|
```
|
||||||
|
|
||||||
运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。
|
运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。
|
||||||
|
|
|
@ -76,7 +76,7 @@ docker run -it --rm \
|
||||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||||
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
|
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
|
||||||
--entrypoint="install" \
|
--entrypoint="install" \
|
||||||
appwrite/appwrite:1.4.6
|
appwrite/appwrite:1.4.7
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
@ -88,7 +88,7 @@ docker run -it --rm ^
|
||||||
--volume //var/run/docker.sock:/var/run/docker.sock ^
|
--volume //var/run/docker.sock:/var/run/docker.sock ^
|
||||||
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
|
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
|
||||||
--entrypoint="install" ^
|
--entrypoint="install" ^
|
||||||
appwrite/appwrite:1.4.6
|
appwrite/appwrite:1.4.7
|
||||||
```
|
```
|
||||||
|
|
||||||
#### PowerShell
|
#### PowerShell
|
||||||
|
@ -98,7 +98,7 @@ docker run -it --rm `
|
||||||
--volume /var/run/docker.sock:/var/run/docker.sock `
|
--volume /var/run/docker.sock:/var/run/docker.sock `
|
||||||
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
|
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
|
||||||
--entrypoint="install" `
|
--entrypoint="install" `
|
||||||
appwrite/appwrite:1.4.6
|
appwrite/appwrite:1.4.7
|
||||||
```
|
```
|
||||||
|
|
||||||
Once the Docker installation is complete, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after completing the installation.
|
Once the Docker installation is complete, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after completing the installation.
|
||||||
|
|
|
@ -92,14 +92,19 @@ App::post('/v1/projects')
|
||||||
|
|
||||||
$projectId = ($projectId == 'unique()') ? ID::unique() : $projectId;
|
$projectId = ($projectId == 'unique()') ? ID::unique() : $projectId;
|
||||||
|
|
||||||
$backups['database_db_fra1_v14x_02'] = ['from' => '03:00', 'to' => '04:00'];
|
$backups['database_db_fra1_v14x_02'] = ['from' => '03:00', 'to' => '05:00'];
|
||||||
$backups['database_db_fra1_v14x_03'] = ['from' => '00:00', 'to' => '01:00'];
|
$backups['database_db_fra1_v14x_03'] = ['from' => '00:00', 'to' => '02:00'];
|
||||||
$backups['database_db_fra1_v14x_04'] = ['from' => '00:00', 'to' => '01:00'];
|
$backups['database_db_fra1_v14x_04'] = ['from' => '00:00', 'to' => '02:00'];
|
||||||
$backups['database_db_fra1_v14x_05'] = ['from' => '00:00', 'to' => '01:00'];
|
$backups['database_db_fra1_v14x_05'] = ['from' => '00:00', 'to' => '02:00'];
|
||||||
$backups['database_db_fra1_v14x_06'] = ['from' => '00:00', 'to' => '01:00'];
|
$backups['database_db_fra1_v14x_06'] = ['from' => '00:00', 'to' => '02:00'];
|
||||||
$backups['database_db_fra1_v14x_07'] = ['from' => '00:00', 'to' => '01:00'];
|
$backups['database_db_fra1_v14x_07'] = ['from' => '00:00', 'to' => '02:00'];
|
||||||
|
|
||||||
$databases = Config::getParam('pools-database', []);
|
$databases = Config::getParam('pools-database', []);
|
||||||
|
$databaseSelfHosted = 'database_db_fra1_self_hosted_0_0';
|
||||||
|
$selfHostedIndex = array_search($databaseSelfHosted, $databases);
|
||||||
|
if ($selfHostedIndex !== false) {
|
||||||
|
unset($databases[$selfHostedIndex]);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove databases from the list that are currently undergoing an backup
|
* Remove databases from the list that are currently undergoing an backup
|
||||||
|
@ -123,7 +128,7 @@ App::post('/v1/projects')
|
||||||
|
|
||||||
$databaseOverride = App::getEnv('_APP_DATABASE_OVERRIDE', null);
|
$databaseOverride = App::getEnv('_APP_DATABASE_OVERRIDE', null);
|
||||||
$index = array_search($databaseOverride, $databases);
|
$index = array_search($databaseOverride, $databases);
|
||||||
if ($index) {
|
if ($index !== false) {
|
||||||
$database = $databases[$index];
|
$database = $databases[$index];
|
||||||
} else {
|
} else {
|
||||||
$database = $databases[array_rand($databases)];
|
$database = $databases[array_rand($databases)];
|
||||||
|
@ -170,6 +175,16 @@ App::post('/v1/projects')
|
||||||
throw new Exception(Exception::PROJECT_ALREADY_EXISTS);
|
throw new Exception(Exception::PROJECT_ALREADY_EXISTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update database with self-managed db every $mod projects
|
||||||
|
*/
|
||||||
|
$mod = 20;
|
||||||
|
if ($project->getInternalId() % $mod === 0 && $selfHostedIndex !== false) {
|
||||||
|
$database = $databaseSelfHosted;
|
||||||
|
$project->setAttribute('database', $database);
|
||||||
|
$dbForConsole->updateDocument('projects', $project->getId(), $project);
|
||||||
|
}
|
||||||
|
|
||||||
$dbForProject = new Database($pools->get($database)->pop()->getResource(), $cache);
|
$dbForProject = new Database($pools->get($database)->pop()->getResource(), $cache);
|
||||||
$dbForProject->setNamespace("_{$project->getInternalId()}");
|
$dbForProject->setNamespace("_{$project->getInternalId()}");
|
||||||
$dbForProject->create();
|
$dbForProject->create();
|
||||||
|
|
|
@ -105,7 +105,7 @@ const APP_KEY_ACCCESS = 24 * 60 * 60; // 24 hours
|
||||||
const APP_USER_ACCCESS = 24 * 60 * 60; // 24 hours
|
const APP_USER_ACCCESS = 24 * 60 * 60; // 24 hours
|
||||||
const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours
|
const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours
|
||||||
const APP_CACHE_BUSTER = 514;
|
const APP_CACHE_BUSTER = 514;
|
||||||
const APP_VERSION_STABLE = '1.4.6';
|
const APP_VERSION_STABLE = '1.4.7';
|
||||||
const APP_DATABASE_ATTRIBUTE_EMAIL = 'email';
|
const APP_DATABASE_ATTRIBUTE_EMAIL = 'email';
|
||||||
const APP_DATABASE_ATTRIBUTE_ENUM = 'enum';
|
const APP_DATABASE_ATTRIBUTE_ENUM = 'enum';
|
||||||
const APP_DATABASE_ATTRIBUTE_IP = 'ip';
|
const APP_DATABASE_ATTRIBUTE_IP = 'ip';
|
||||||
|
|
|
@ -71,6 +71,7 @@ abstract class Migration
|
||||||
'1.4.4' => 'V19',
|
'1.4.4' => 'V19',
|
||||||
'1.4.5' => 'V19',
|
'1.4.5' => 'V19',
|
||||||
'1.4.6' => 'V19',
|
'1.4.6' => 'V19',
|
||||||
|
'1.4.7' => 'V19',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -77,7 +77,7 @@ class Functions extends Action
|
||||||
|
|
||||||
$type = $payload['type'] ?? '';
|
$type = $payload['type'] ?? '';
|
||||||
$events = $payload['events'] ?? [];
|
$events = $payload['events'] ?? [];
|
||||||
$data = $payload['data'] ?? '';
|
$data = $payload['body'] ?? '';
|
||||||
$eventData = $payload['payload'] ?? '';
|
$eventData = $payload['payload'] ?? '';
|
||||||
$project = new Document($payload['project'] ?? []);
|
$project = new Document($payload['project'] ?? []);
|
||||||
$function = new Document($payload['function'] ?? []);
|
$function = new Document($payload['function'] ?? []);
|
||||||
|
|
|
@ -5,6 +5,7 @@ namespace Appwrite\Platform\Workers;
|
||||||
use Appwrite\Template\Template;
|
use Appwrite\Template\Template;
|
||||||
use Exception;
|
use Exception;
|
||||||
use PHPMailer\PHPMailer\PHPMailer;
|
use PHPMailer\PHPMailer\PHPMailer;
|
||||||
|
use Swoole\Runtime;
|
||||||
use Utopia\App;
|
use Utopia\App;
|
||||||
use Utopia\CLI\Console;
|
use Utopia\CLI\Console;
|
||||||
use Utopia\Platform\Action;
|
use Utopia\Platform\Action;
|
||||||
|
@ -39,7 +40,7 @@ class Mails extends Action
|
||||||
*/
|
*/
|
||||||
public function action(Message $message, Registry $register): void
|
public function action(Message $message, Registry $register): void
|
||||||
{
|
{
|
||||||
|
Runtime::setHookFlags(SWOOLE_HOOK_ALL ^ SWOOLE_HOOK_TCP);
|
||||||
$payload = $message->getPayload() ?? [];
|
$payload = $message->getPayload() ?? [];
|
||||||
|
|
||||||
if (empty($payload)) {
|
if (empty($payload)) {
|
||||||
|
|
Loading…
Reference in a new issue