From 80241e37c3b888d6b78cfbdb38b24b115a1296dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Thu, 13 Feb 2025 09:47:37 +0100 Subject: [PATCH 1/3] Update tempalte auto-values --- app/config/site-templates.php | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/app/config/site-templates.php b/app/config/site-templates.php index f9ea1b5416..1e64d78c09 100644 --- a/app/config/site-templates.php +++ b/app/config/site-templates.php @@ -145,33 +145,25 @@ return [ 'variables' => [ [ 'name' => 'PUBLIC_APPWRITE_ENDPOINT', - 'description' => 'Endpoint of Appwrite server.', - 'value' => 'https://cloud.appwrite.io/v1', + 'description' => 'Endpoint of Appwrite server', + 'value' => '{apiEndpoint}', 'placeholder' => 'https://cloud.appwrite.io/v1', 'required' => true, 'type' => 'text' ], [ 'name' => 'PUBLIC_APPWRITE_PROJECT_ID', - 'description' => 'Your Appwrite project ID.', - 'value' => '', - 'placeholder' => '67ab5b6d000db4f5f59d', + 'description' => 'Your Appwrite project ID', + 'value' => '{projectId}', + 'placeholder' => '{projectId}', 'required' => true, 'type' => 'text' ], [ 'name' => 'PUBLIC_APPWRITE_PROJECT_NAME', - 'description' => 'Your Appwrite project name.', - 'value' => '', - 'placeholder' => 'My project', - 'required' => true, - 'type' => 'text' - ], - [ - 'name' => 'PUBLIC_APPWRITE_VERSION', - 'description' => 'Version of Appwrite server.', - 'value' => '1.7.0', - 'placeholder' => '1.7.0', + 'description' => 'Your Appwrite project name', + 'value' => '{projectName}', + 'placeholder' => '{projectName}', 'required' => true, 'type' => 'text' ], From 313444cb12e1eb4199138fc7e7cbb6f1abb8aed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Thu, 13 Feb 2025 11:14:08 +0100 Subject: [PATCH 2/3] Fix envCommands set too late --- .../Modules/Functions/Workers/Builds.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index 41ab2fe02a..809cb96cc2 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -869,22 +869,27 @@ class Builds extends Action } elseif ($resource->getCollection() === 'sites') { $commands = []; - $commands[] = $deployment->getAttribute('installCommand', ''); - $commands[] = $deployment->getAttribute('buildCommand', ''); - $frameworks = Config::getParam('frameworks', []); $framework = $frameworks[$resource->getAttribute('framework', '')] ?? null; + $envCommand = ''; + $bundleCommand = ''; + if (!is_null($framework)) { $adapter = ($framework['adapters'] ?? [])[$resource->getAttribute('adapter', '')] ?? null; - if (!is_null($adapter) && isset($adapter['bundleCommand'])) { - $commands[] = $adapter['bundleCommand']; - } if (!is_null($adapter) && isset($adapter['envCommand'])) { - $commands[] = $adapter['envCommand']; + $envCommand = $adapter['envCommand']; + } + if (!is_null($adapter) && isset($adapter['bundleCommand'])) { + $bundleCommand = $adapter['bundleCommand']; } } + $commands[] = $envCommand; + $commands[] = $deployment->getAttribute('installCommand', ''); + $commands[] = $deployment->getAttribute('buildCommand', ''); + $commands[] = $bundleCommand; + $commands = array_filter($commands, fn ($command) => !empty($command)); return implode(' && ', $commands); From f6fbc253f7654184ade08de36d31dff29daa38fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Thu, 13 Feb 2025 11:33:22 +0100 Subject: [PATCH 3/3] Update Console --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index e4d7ac4b17..77b416c219 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -204,7 +204,7 @@ services: appwrite-console: <<: *x-logging container_name: appwrite-console - image: appwrite/console:5.3.0-sites-rc.5 + image: appwrite/console:5.3.0-sites-rc.6 restart: unless-stopped networks: - appwrite