diff --git a/.env b/.env index 88685e5e33..926ada82ba 100644 --- a/.env +++ b/.env @@ -16,7 +16,6 @@ _APP_OPTIONS_FORCE_HTTPS=disabled _APP_OPENSSL_KEY_V1=your-secret-key _APP_DOMAIN=localhost _APP_DOMAIN_FUNCTIONS=functions.localhost -_APP_DOMAIN_DO_TOKEN= _APP_DOMAIN_TARGET=localhost _APP_REDIS_HOST=redis _APP_REDIS_PORT=6379 @@ -55,8 +54,8 @@ _APP_STORAGE_PREVIEW_LIMIT=20000000 _APP_FUNCTIONS_SIZE_LIMIT=30000000 _APP_FUNCTIONS_TIMEOUT=900 _APP_FUNCTIONS_BUILD_TIMEOUT=900 -_APP_FUNCTIONS_CPUS=4 -_APP_FUNCTIONS_MEMORY=2048 +_APP_FUNCTIONS_CPUS=1 +_APP_FUNCTIONS_MEMORY=1024 _APP_FUNCTIONS_INACTIVE_THRESHOLD=600 _APP_FUNCTIONS_MAINTENANCE_INTERVAL=600 _APP_FUNCTIONS_RUNTIMES_NETWORK=runtimes @@ -90,4 +89,4 @@ _APP_VCS_GITHUB_CLIENT_SECRET= _APP_VCS_GITHUB_WEBHOOK_SECRET= _APP_MIGRATIONS_FIREBASE_CLIENT_ID= _APP_MIGRATIONS_FIREBASE_CLIENT_SECRET= -OPENAI_API_KEY= +_APP_ASSISTANT_OPENAI_API_KEY= \ No newline at end of file diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 5fa20306a8..62b5951346 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1715,7 +1715,7 @@ App::post('/v1/functions/:functionId/variables') ->label('sdk.response.model', Response::MODEL_VARIABLE) ->param('functionId', '', new UID(), 'Function unique ID.', false) ->param('key', null, new Text(Database::LENGTH_KEY), 'Variable key. Max length: ' . Database::LENGTH_KEY . ' chars.', false) - ->param('value', null, new Text(8192), 'Variable value. Max length: 8192 chars.', false) + ->param('value', null, new Text(8192, 0), 'Variable value. Max length: 8192 chars.', false) ->inject('project') ->inject('response') ->inject('dbForProject') @@ -1852,7 +1852,7 @@ App::put('/v1/functions/:functionId/variables/:variableId') ->param('functionId', '', new UID(), 'Function unique ID.', false) ->param('variableId', '', new UID(), 'Variable unique ID.', false) ->param('key', null, new Text(255), 'Variable key. Max length: 255 chars.', false) - ->param('value', null, new Text(8192), 'Variable value. Max length: 8192 chars.', true) + ->param('value', null, new Text(8192, 0), 'Variable value. Max length: 8192 chars.', true) ->inject('project') ->inject('response') ->inject('dbForProject') diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index 0a19fa062e..18217b6f34 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -115,7 +115,7 @@ App::post('/v1/project/variables') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_VARIABLE) ->param('key', null, new Text(Database::LENGTH_KEY), 'Variable key. Max length: ' . Database::LENGTH_KEY . ' chars.', false) - ->param('value', null, new Text(8192), 'Variable value. Max length: 8192 chars.', false) + ->param('value', null, new Text(8192, 0), 'Variable value. Max length: 8192 chars.', false) ->inject('project') ->inject('response') ->inject('dbForProject') @@ -222,7 +222,7 @@ App::put('/v1/project/variables/:variableId') ->label('sdk.response.model', Response::MODEL_VARIABLE) ->param('variableId', '', new UID(), 'Variable unique ID.', false) ->param('key', null, new Text(255), 'Variable key. Max length: 255 chars.', false) - ->param('value', null, new Text(8192), 'Variable value. Max length: 8192 chars.', true) + ->param('value', null, new Text(8192, 0), 'Variable value. Max length: 8192 chars.', true) ->inject('project') ->inject('response') ->inject('dbForProject') diff --git a/docker-compose.yml b/docker-compose.yml index 7b923b55be..acbbbab37b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -72,7 +72,6 @@ services: - traefik.http.routers.appwrite_api_https.rule=PathPrefix(`/`) - traefik.http.routers.appwrite_api_https.service=appwrite_api - traefik.http.routers.appwrite_api_https.tls=true - - traefik.http.routers.appwrite_api_https.tls.certresolver=digitalocean - traefik.http.routers.appwrite_api_https.tls.domains[0].main=$_APP_DOMAIN_FUNCTIONS - traefik.http.routers.appwrite_api_https.tls.domains[0].sans=*.$_APP_DOMAIN_FUNCTIONS volumes: @@ -758,14 +757,15 @@ services: - _APP_CONNECTIONS_QUEUE - _APP_REGION - # appwrite-assistant: - # container_name: appwrite-assistant - # hostname: appwrite-assistant - # image: appwrite/assistant:0.1.0 - # networks: - # - appwrite - # environment: - # - OPENAI_API_KEY + appwrite-assistant: + container_name: appwrite-assistant + hostname: appwrite-assistant + image: appwrite/assistant:0.1.0 + platform: linux/amd64 + networks: + - appwrite + environment: + - _APP_ASSISTANT_OPENAI_API_KEY openruntimes-executor: container_name: openruntimes-executor diff --git a/src/Appwrite/Event/Delete.php b/src/Appwrite/Event/Delete.php index 18f55975d8..8e593b1020 100644 --- a/src/Appwrite/Event/Delete.php +++ b/src/Appwrite/Event/Delete.php @@ -12,8 +12,6 @@ class Delete extends Event protected ?string $resource = null; protected ?string $datetime = null; protected ?string $hourlyUsageRetentionDatetime = null; - protected ?Document $function = null; - public function __construct() { @@ -128,8 +126,7 @@ class Delete extends Event 'document' => $this->document, 'resource' => $this->resource, 'datetime' => $this->datetime, - 'hourlyUsageRetentionDatetime' => $this->hourlyUsageRetentionDatetime, - 'function' => $this->function + 'hourlyUsageRetentionDatetime' => $this->hourlyUsageRetentionDatetime ]); } }