Add vars for Console
This commit is contained in:
parent
eb689d86c5
commit
20a2d3755e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -30,11 +30,17 @@ App::get('/v1/console/variables')
|
|||
->inject('response')
|
||||
->action(function (Response $response) {
|
||||
|
||||
$isVcsEnabled = !empty(App::getEnv('_APP_VCS_GITHUB_APP_NAME', '')) && !empty(App::getEnv('_APP_VCS_GITHUB_PRIVATE_KEY', '')) && !empty(App::getEnv('_APP_VCS_GITHUB_APP_ID', '')) && !empty(App::getEnv('_APP_VCS_GITHUB_CLIENT_ID', '')) && !empty(App::getEnv('_APP_VCS_GITHUB_CLIENT_SECRET', ''));
|
||||
|
||||
$isAssistantEnabled = !empty(App::getEnv('_APP_ASSISTANT_OPENAI_API_KEY', ''));
|
||||
|
||||
$variables = new Document([
|
||||
'_APP_DOMAIN_TARGET' => App::getEnv('_APP_DOMAIN_TARGET'),
|
||||
'_APP_STORAGE_LIMIT' => +App::getEnv('_APP_STORAGE_LIMIT'),
|
||||
'_APP_FUNCTIONS_SIZE_LIMIT' => +App::getEnv('_APP_FUNCTIONS_SIZE_LIMIT'),
|
||||
'_APP_USAGE_STATS' => App::getEnv('_APP_USAGE_STATS'),
|
||||
'_APP_VCS_ENABLED' => $isVcsEnabled,
|
||||
'_APP_ASSISTANT_ENABLED' => $isAssistantEnabled
|
||||
]);
|
||||
|
||||
$response->dynamic($variables, Response::MODEL_CONSOLE_VARIABLES);
|
||||
|
|
|
@ -176,6 +176,7 @@ services:
|
|||
- _APP_VCS_GITHUB_CLIENT_ID
|
||||
- _APP_MIGRATIONS_FIREBASE_CLIENT_ID
|
||||
- _APP_MIGRATIONS_FIREBASE_CLIENT_SECRET
|
||||
- _APP_ASSISTANT_OPENAI_API_KEY
|
||||
|
||||
appwrite-realtime:
|
||||
entrypoint: realtime
|
||||
|
@ -760,8 +761,7 @@ services:
|
|||
appwrite-assistant:
|
||||
container_name: appwrite-assistant
|
||||
hostname: appwrite-assistant
|
||||
image: appwrite/assistant:0.1.1
|
||||
platform: linux/amd64
|
||||
image: appwrite/assistant:0.1.2
|
||||
networks:
|
||||
- appwrite
|
||||
environment:
|
||||
|
|
|
@ -33,6 +33,18 @@ class ConsoleVariables extends Model
|
|||
'description' => 'Defines if usage stats are enabled. This value is set to \'enabled\' by default, to disable the usage stats set the value to \'disabled\'.',
|
||||
'default' => '',
|
||||
'example' => 'enabled',
|
||||
])
|
||||
->addRule('_APP_VCS_ENABLED', [
|
||||
'type' => self::TYPE_BOOLEAN,
|
||||
'description' => 'Defines if VCS (Version Control System) is enabled.',
|
||||
'default' => false,
|
||||
'example' => true,
|
||||
])
|
||||
->addRule('_APP_ASSISTANT_ENABLED', [
|
||||
'type' => self::TYPE_BOOLEAN,
|
||||
'description' => 'Defines if AI assistant is enabled.',
|
||||
'default' => false,
|
||||
'example' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -111,6 +111,12 @@ class Func extends Model
|
|||
'default' => '',
|
||||
'example' => 'npm install',
|
||||
])
|
||||
->addRule('version', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Version of Open Runtimes used for the function.',
|
||||
'default' => 'v3',
|
||||
'example' => 'v2',
|
||||
])
|
||||
->addRule('installationId', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Function VCS (Version Control System) installation id.',
|
||||
|
|
Loading…
Reference in a new issue