diff --git a/app/config/templates/site.php b/app/config/templates/site.php index 5aae737843..6989cc026d 100644 --- a/app/config/templates/site.php +++ b/app/config/templates/site.php @@ -116,6 +116,15 @@ const TEMPLATE_FRAMEWORKS = [ 'outputDirectory' => './dist/angular/browser', 'fallbackFile' => 'index.html', ], + 'ANALOG' => [ + 'key' => 'analog', + 'name' => 'Analog', + 'installCommand' => 'npm install', + 'buildCommand' => 'npm run build', + 'buildRuntime' => 'node-22', + 'adapter' => 'ssr', + 'outputDirectory' => './dist/analog', + ], 'VUE' => [ 'key' => 'vue', 'name' => 'Vue.js', @@ -581,6 +590,139 @@ return [ ], ] ], + [ + 'key' => 'starter-for-astro', + 'name' => 'Astro starter', + 'useCases' => [UseCases::STARTER], + 'tagline' => 'Simple Astro application integrated with Appwrite SDK.', + 'score' => 3, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) + 'screenshotDark' => $url . '/images/sites/templates/starter-for-astro-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/starter-for-astro-light.png', + 'frameworks' => [ + getFramework('ASTRO', [ + 'providerRootDirectory' => './', + 'adapter' => 'static', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'starter-for-astro', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.1.*', + 'variables' => [ + [ + 'name' => 'PUBLIC_APPWRITE_ENDPOINT', + 'description' => 'Endpoint of Appwrite server', + 'value' => '{apiEndpoint}', + 'placeholder' => '{apiEndpoint}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'PUBLIC_APPWRITE_PROJECT_ID', + 'description' => 'Your Appwrite project ID', + 'value' => '{projectId}', + 'placeholder' => '{projectId}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'PUBLIC_APPWRITE_PROJECT_NAME', + 'description' => 'Your Appwrite project name', + 'value' => '{projectName}', + 'placeholder' => '{projectName}', + 'required' => true, + 'type' => 'text' + ], + ] + ], + [ + 'key' => 'starter-for-analog', + 'name' => 'Analog starter', + 'useCases' => [UseCases::STARTER], + 'tagline' => 'Simple Analog application integrated with Appwrite SDK.', + 'score' => 3, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) + 'screenshotDark' => $url . '/images/sites/templates/starter-for-analog-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/starter-for-analog-light.png', + 'frameworks' => [ + getFramework('ANALOG', [ + 'providerRootDirectory' => './', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'starter-for-analog', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.1.*', + 'variables' => [ + [ + 'name' => 'VITE_APPWRITE_ENDPOINT', + 'description' => 'Endpoint of Appwrite server', + 'value' => '{apiEndpoint}', + 'placeholder' => '{apiEndpoint}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'VITE_APPWRITE_PROJECT_ID', + 'description' => 'Your Appwrite project ID', + 'value' => '{projectId}', + 'placeholder' => '{projectId}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'VITE_APPWRITE_PROJECT_NAME', + 'description' => 'Your Appwrite project name', + 'value' => '{projectName}', + 'placeholder' => '{projectName}', + 'required' => true, + 'type' => 'text' + ], + ] + ], + [ + 'key' => 'starter-for-remix', + 'name' => 'Remix starter', + 'useCases' => [UseCases::STARTER], + 'tagline' => 'Simple Remix application integrated with Appwrite SDK.', + 'score' => 3, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) + 'screenshotDark' => $url . '/images/sites/templates/starter-for-remix-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/starter-for-remix-light.png', + 'frameworks' => [ + getFramework('REMIX', [ + 'providerRootDirectory' => './', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'starter-for-remix', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.1.*', + 'variables' => [ + [ + 'name' => 'VITE_APPWRITE_ENDPOINT', + 'description' => 'Endpoint of Appwrite server', + 'value' => '{apiEndpoint}', + 'placeholder' => '{apiEndpoint}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'VITE_APPWRITE_PROJECT_ID', + 'description' => 'Your Appwrite project ID', + 'value' => '{projectId}', + 'placeholder' => '{projectId}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'VITE_APPWRITE_PROJECT_NAME', + 'description' => 'Your Appwrite project name', + 'value' => '{projectName}', + 'placeholder' => '{projectName}', + 'required' => true, + 'type' => 'text' + ], + ] + ], [ 'key' => 'starter-for-svelte', 'name' => 'Svelte starter', @@ -966,6 +1108,7 @@ return [ 'providerVersion' => '0.1.*', 'variables' => [] ], + // TODO: Remove astro starter eventually, or add all frameworks's starters [ 'key' => 'astro-starter', 'name' => 'Astro starter', diff --git a/docker-compose.yml b/docker-compose.yml index 9a6f507da3..bec3d8c88e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -211,7 +211,7 @@ services: appwrite-console: <<: *x-logging container_name: appwrite-console - image: appwrite/console:5.3.0-sites-rc.38 + image: appwrite/console:5.3.0-sites-rc.40 restart: unless-stopped networks: - appwrite diff --git a/public/images/sites/templates/starter-for-analog-dark.png b/public/images/sites/templates/starter-for-analog-dark.png new file mode 100644 index 0000000000..7529e08dd8 Binary files /dev/null and b/public/images/sites/templates/starter-for-analog-dark.png differ diff --git a/public/images/sites/templates/starter-for-analog-light.png b/public/images/sites/templates/starter-for-analog-light.png new file mode 100644 index 0000000000..7529e08dd8 Binary files /dev/null and b/public/images/sites/templates/starter-for-analog-light.png differ diff --git a/public/images/sites/templates/starter-for-astro-dark.png b/public/images/sites/templates/starter-for-astro-dark.png new file mode 100644 index 0000000000..5380b32b7d Binary files /dev/null and b/public/images/sites/templates/starter-for-astro-dark.png differ diff --git a/public/images/sites/templates/starter-for-astro-light.png b/public/images/sites/templates/starter-for-astro-light.png new file mode 100644 index 0000000000..5380b32b7d Binary files /dev/null and b/public/images/sites/templates/starter-for-astro-light.png differ diff --git a/public/images/sites/templates/starter-for-remix-dark.png b/public/images/sites/templates/starter-for-remix-dark.png new file mode 100644 index 0000000000..76e80dde71 Binary files /dev/null and b/public/images/sites/templates/starter-for-remix-dark.png differ diff --git a/public/images/sites/templates/starter-for-remix-light.png b/public/images/sites/templates/starter-for-remix-light.png new file mode 100644 index 0000000000..76e80dde71 Binary files /dev/null and b/public/images/sites/templates/starter-for-remix-light.png differ diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index ea6cac8374..7e429defca 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -565,6 +565,10 @@ class Builds extends Action // Some runtimes/frameworks can't compile with less memory than this $minMemory = $resource->getCollection() === 'sites' ? 2048 : 1024; + if ($resource->getAttribute('framework', '') === 'analog') { + $minMemory = 4096; + } + $cpus = $spec['cpus'] ?? APP_COMPUTE_CPUS_DEFAULT; $memory = max($spec['memory'] ?? APP_COMPUTE_MEMORY_DEFAULT, $minMemory); $timeout = (int) System::getEnv('_APP_COMPUTE_BUILD_TIMEOUT', 900); diff --git a/src/Appwrite/Platform/Tasks/Screenshot.php b/src/Appwrite/Platform/Tasks/Screenshot.php index 918ce60e11..79593ab39b 100644 --- a/src/Appwrite/Platform/Tasks/Screenshot.php +++ b/src/Appwrite/Platform/Tasks/Screenshot.php @@ -147,7 +147,7 @@ class Screenshot extends Action 'installCommand' => $framework['installCommand'] ?? '', 'outputDirectory' => $framework['outputDirectory'] ?? '', 'providerRootDirectory' => $framework['providerRootDirectory'], - 'timeout' => 60 + 'timeout' => 30 ]); if ($site['headers']['status-code'] !== 201) {