1
0
Fork 0
mirror of synced 2024-06-03 03:14:50 +12:00

executor version in environment variable and using new runtimes

This commit is contained in:
Damodar Lohani 2022-05-15 06:25:18 +00:00
parent 633ef3ae4a
commit 7f9d6ae676
6 changed files with 21 additions and 10 deletions

View file

@ -187,6 +187,7 @@ ENV _APP_SERVER=swoole \
_APP_EXECUTOR_SECRET=a-random-secret \
_APP_EXECUTOR_HOST=http://appwrite-executor/v1 \
_APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes \
_APP_EXECUTOR_VERSION=v1 \
_APP_SETUP=self-hosted \
_APP_VERSION=$VERSION \
_APP_USAGE_STATS=enabled \

View file

@ -6,7 +6,7 @@ use Appwrite\Runtimes\Runtimes;
/**
* List of Appwrite Cloud Functions supported runtimes
*/
$runtimes = new Runtimes();
$runtimes = new Runtimes(App::getEnv('_APP_EXECUTOR_VERSION'));
$allowList = empty(App::getEnv('_APP_FUNCTIONS_RUNTIMES')) ? [] : \explode(',', App::getEnv('_APP_FUNCTIONS_RUNTIMES'));

View file

@ -1,7 +1,6 @@
<?php
use Utopia\Config\Config;
return [
[
'category' => 'General',
@ -615,6 +614,15 @@ return [
'question' => '',
'filter' => ''
],
[
'name' => '_APP_EXECUTOR_VERSION',
'description' => 'Executor version',
'introduction' => '0.14.0',
'default' => 'v1',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_FUNCTIONS_ENVS',
'description' => 'Deprecated with 0.8.0, use \'_APP_FUNCTIONS_RUNTIMES\' instead!',

View file

@ -584,7 +584,7 @@ $http->on('start', function ($http) {
/**
* Warmup: make sure images are ready to run fast 🚀
*/
$runtimes = new Runtimes();
$runtimes = new Runtimes(App::getEnv('_APP_EXECUTOR_VERSION'));
$allowList = empty(App::getEnv('_APP_FUNCTIONS_RUNTIMES')) ? [] : \explode(',', App::getEnv('_APP_FUNCTIONS_RUNTIMES'));
$runtimes = $runtimes->getAll(true, $allowList);
foreach ($runtimes as $runtime) {

View file

@ -36,7 +36,7 @@
"ext-zlib": "*",
"ext-sockets": "*",
"appwrite/php-clamav": "1.1.*",
"appwrite/php-runtimes": "0.7.*",
"appwrite/php-runtimes": "dev-feat-runtime-versioning",
"utopia-php/framework": "0.19.*",
"utopia-php/logger": "0.3.*",
"utopia-php/abuse": "0.7.*",

14
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "23a43ddfd26689ff154463410f7da3a4",
"content-hash": "b4d24566e38e481c9b5612033101324f",
"packages": [
{
"name": "adhocore/jwt",
@ -115,11 +115,11 @@
},
{
"name": "appwrite/php-runtimes",
"version": "0.7.4",
"version": "dev-feat-runtime-versioning",
"source": {
"type": "git",
"url": "https://github.com/appwrite/runtimes.git",
"reference": "8e0972ecce6ad96f3701edab8d2c9a8af7074093"
"reference": "3c47c09c0781434f5aba726f726c695f144917b1"
},
"require": {
"php": ">=8.0",
@ -154,7 +154,7 @@
"php",
"runtimes"
],
"time": "2022-02-26T11:38:09+00:00"
"time": "2022-05-15T03:00:16+00:00"
},
{
"name": "chillerlan/php-qrcode",
@ -6554,7 +6554,9 @@
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {
"appwrite/php-runtimes": 20
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
@ -6576,5 +6578,5 @@
"platform-overrides": {
"php": "8.0"
},
"plugin-api-version": "2.1.0"
"plugin-api-version": "2.2.0"
}