-
Notifications
You must be signed in to change notification settings - Fork 296
Add documentation for one-click deployments #2614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import type { RequestHandler } from '@sveltejs/kit'; | ||
| import { readFile } from 'fs/promises'; | ||
| import { join } from 'path'; | ||
|
|
||
| export const GET: RequestHandler = async ({ url }) => { | ||
| const variant = url.searchParams.get('variant') || 'dark'; | ||
| const filename = variant === 'light' ? 'light.svg' : 'dark.svg'; | ||
| const filePath = join(process.cwd(), 'static', 'images', 'deploy', filename); | ||
|
|
||
| try { | ||
| const svgContent = await readFile(filePath, 'utf-8'); | ||
|
|
||
| return new Response(svgContent, { | ||
| headers: { | ||
| 'Content-Type': 'image/svg+xml', | ||
| 'Cache-Control': 'public, max-age=31536000, immutable' | ||
| } | ||
| }); | ||
| } catch { | ||
| return new Response('SVG file not found', { | ||
| status: 404, | ||
| headers: { | ||
| 'Content-Type': 'text/plain' | ||
| } | ||
| }); | ||
| } | ||
| }; | ||
|
|
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,123 @@ | ||||||
| --- | ||||||
| layout: article | ||||||
| title: One-Click Deployment | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use sentence case, not title case
Suggested change
Same goes for sites |
||||||
| description: Make your function available to deploy with one click for other users. | ||||||
| --- | ||||||
|
|
||||||
| Appwrite allows you to make your function available to deploy with one click for other users. This is useful if your function is a template or an open-source project. Using one-click deployment link will ensure your function is easy to setup and deploy for other users, with you providing all the necessary information and configuration. | ||||||
|
|
||||||
| You may add the deploy link to your GitHub repository's README file or any other documentation you may have. | ||||||
|
|
||||||
| # The deploy button {% #the-deploy-button %} | ||||||
|
|
||||||
| You may use the deploy button wherever you want to display a button to deploy your function with Appwrite. The button is hosted on the following URL: | ||||||
|
|
||||||
| ```text | ||||||
| https://appwrite.io/deploy | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd confirm with Eldad if it's okay to use this path We may want to use this in the future for something else |
||||||
| ``` | ||||||
|
|
||||||
| By default, the button will be displayed in dark mode. You may change the mode by appending `?variant=light` to the URL. | ||||||
|
|
||||||
| # Create deployment link {% #create-deployment-link %} | ||||||
|
|
||||||
| You may construct the deploy URL by using the following URL: | ||||||
|
|
||||||
| ```text | ||||||
| https://cloud.appwrite.io/console/functions/deploy?repo=[GITHUB_REPO_URL] | ||||||
| ``` | ||||||
|
|
||||||
| If you are self-hosting Appwrite, you may point the URL to your Appwrite instance. | ||||||
|
|
||||||
| # Deployment parameters {% #deployment-parameters %} | ||||||
|
|
||||||
| You can customize the deployment link by adding query parameters to the URL. The following parameters are available: | ||||||
|
|
||||||
| {% table %} | ||||||
| - Parameter | ||||||
| - Description | ||||||
| --- | ||||||
| - `repo` / `repository` | ||||||
| - GitHub repository URL. One of these must be present whenever `template` is absent. | ||||||
| --- | ||||||
| - `name` | ||||||
| - Optional string to override the displayed function name (defaults to the repository name). | ||||||
| --- | ||||||
| - `env` | ||||||
| - Comma-separated list of environment variable keys (e.g., `?env=ENV1,ENV2`). | ||||||
| --- | ||||||
| - `rootDir` | ||||||
| - Optional string to set the root directory. | ||||||
| --- | ||||||
| - `entrypoint` | ||||||
| - Optional string to set the entrypoint file. | ||||||
| --- | ||||||
| - `runtime` | ||||||
| - Optional string to override the runtime (defaults to `node-18.0`). | ||||||
| --- | ||||||
| - `install` | ||||||
| - Optional string to override the install command. | ||||||
| --- | ||||||
| - `build` | ||||||
| - Optional string to override the build command. | ||||||
| --- | ||||||
| - `output` | ||||||
| - Optional string to override the output directory. | ||||||
| {% /table %} | ||||||
|
|
||||||
| # Runtimes {% #runtimes %} | ||||||
|
|
||||||
| You can provide the runtime to be used with the provided function. Appwrite Functions supports the following runtimes: | ||||||
|
|
||||||
| {% table %} | ||||||
| - Language | ||||||
| - Runtime Values | ||||||
| --- | ||||||
| - Node.js | ||||||
| - `node-14.5`, `node-16.0`, `node-18.0`, `node-19.0`, `node-20.0`, `node-21.0`, `node-22` | ||||||
| --- | ||||||
| - PHP | ||||||
| - `php-8.0`, `php-8.1`, `php-8.2`, `php-8.3` | ||||||
| --- | ||||||
| - Ruby | ||||||
| - `ruby-3.0`, `ruby-3.1`, `ruby-3.2`, `ruby-3.3` | ||||||
| --- | ||||||
| - Python | ||||||
| - `python-3.8`, `python-3.9`, `python-3.10`, `python-3.11`, `python-3.12` | ||||||
| --- | ||||||
| - Python (ML) | ||||||
| - `python-ml-3.11`, `python-ml-3.12` | ||||||
| --- | ||||||
| - Deno | ||||||
| - `deno-1.40`, `deno-1.46`, `deno-2.0` | ||||||
| --- | ||||||
| - Dart | ||||||
| - `dart-2.15`, `dart-2.16`, `dart-2.17`, `dart-2.18`, `dart-2.19`, `dart-3.0`, `dart-3.1`, `dart-3.3`, `dart-3.5`, `dart-3.8` | ||||||
| --- | ||||||
| - .NET | ||||||
| - `dotnet-6.0`, `dotnet-7.0`, `dotnet-8.0` | ||||||
| --- | ||||||
| - Java | ||||||
| - `java-8.0`, `java-11.0`, `java-17.0`, `java-18.0`, `java-21.0`, `java-22` | ||||||
| --- | ||||||
| - Swift | ||||||
| - `swift-5.5`, `swift-5.8`, `swift-5.9`, `swift-5.10` | ||||||
| --- | ||||||
| - Kotlin | ||||||
| - `kotlin-1.6`, `kotlin-1.8`, `kotlin-1.9`, `kotlin-2.0` | ||||||
| --- | ||||||
| - C++ | ||||||
| - `cpp-17`, `cpp-20` | ||||||
| --- | ||||||
| - Bun | ||||||
| - `bun-1.0`, `bun-1.1` | ||||||
| --- | ||||||
| - Go | ||||||
| - `go-1.23` | ||||||
| --- | ||||||
| - Static | ||||||
| - `static-1` | ||||||
| --- | ||||||
| - Flutter | ||||||
| - `flutter-3.24`, `flutter-3.27`, `flutter-3.29`, `flutter-3.32` | ||||||
| {% /table %} | ||||||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,6 +76,10 @@ | |
| { | ||
| label: 'Deploy manually', | ||
| href: '/docs/products/sites/deploy-manually' | ||
| }, | ||
| { | ||
| label: 'One-Click Deployment', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. Any reason we're not using sentence case for the title?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No reason, I'll change that! |
||
| href: '/docs/products/sites/one-click-deployment' | ||
| } | ||
| ] | ||
| }, | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,123 @@ | ||||||
| --- | ||||||
| layout: article | ||||||
| title: One-Click Deployment | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| description: Make your site available to deploy with one click for other users. | ||||||
| --- | ||||||
|
|
||||||
| Appwrite allows you to make your site available to deploy with one click for other users. This is useful if your site is a template or an open-source project. Using one-click deployment link will ensure your site is easy to setup and deploy for other users, with you providing all the necessary information and configuration. | ||||||
|
|
||||||
| You may add the deploy link to your GitHub repository's README file or any other documentation you may have. | ||||||
|
|
||||||
| # The deploy button {% #the-deploy-button %} | ||||||
|
|
||||||
| You may use the deploy button wherever you want to display a button to deploy your site with Appwrite. The button is hosted on the following URL: | ||||||
|
|
||||||
| ```text | ||||||
| https://appwrite.io/deploy | ||||||
| ``` | ||||||
|
|
||||||
| By default, the button will be displayed in dark mode. You may change the mode by appending `?variant=light` to the URL. | ||||||
|
|
||||||
| # Create deployment link {% #create-deployment-link %} | ||||||
|
|
||||||
| You may construct the deploy URL by using the following URL: | ||||||
|
|
||||||
| ```text | ||||||
| https://cloud.appwrite.io/console/sites/deploy?repo=[GITHUB_REPO_URL] | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is missing region
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should work without it |
||||||
| ``` | ||||||
|
|
||||||
| If you are self-hosting Appwrite, you may point the URL to your Appwrite instance. | ||||||
|
|
||||||
| # Deployment parameters {% #deployment-parameters %} | ||||||
|
|
||||||
| You can customize the deployment link by adding query parameters to the URL. The following parameters are available: | ||||||
|
|
||||||
| {% table %} | ||||||
| - Parameter | ||||||
| - Description | ||||||
| --- | ||||||
| - `repo` / `repository` | ||||||
| - GitHub repository URL. One of these must be present whenever `template` is absent. | ||||||
| --- | ||||||
| - `template` | ||||||
| - Required when launching from a curated template; expects a Sites template ID such as `starter-for-nextjs`. Not needed if `repo` is present. | ||||||
| --- | ||||||
| - `name` | ||||||
| - Optional string to override the displayed project/site name (defaults to template or repo name). Only shown when `screenshot` is present. | ||||||
| --- | ||||||
| - `tagline` | ||||||
| - Optional short description surfaced in the deploy card (defaults to template tagline when available). Only shown when `screenshot` is present. | ||||||
| --- | ||||||
| - `screenshot` | ||||||
| - Optional image URL to preview the template/repo. | ||||||
| --- | ||||||
| - `env` | ||||||
| - Comma-separated list of environment variable keys (e.g., `?env=ENV1,ENV2`). | ||||||
| --- | ||||||
| - `preset` | ||||||
| - Optional string to override the framework preset (defaults to `nextjs`). | ||||||
| --- | ||||||
| - `install` | ||||||
| - Optional string to override the install command. | ||||||
| --- | ||||||
| - `build` | ||||||
| - Optional string to override the build command. | ||||||
| --- | ||||||
| - `output` | ||||||
| - Optional string to override the output directory. | ||||||
| {% /table %} | ||||||
|
|
||||||
| # Presets {% #presets %} | ||||||
|
|
||||||
| Appwrite Sites supports the following framework presets. By default, Appwrite will consider the framework of your repository to be Next.js. | ||||||
|
|
||||||
| {% table %} | ||||||
| - Preset | ||||||
| - Value | ||||||
| --- | ||||||
| - Analog | ||||||
| - `analog` | ||||||
| --- | ||||||
| - Angular | ||||||
| - `angular` | ||||||
| --- | ||||||
| - Next.js | ||||||
| - `nextjs` | ||||||
| --- | ||||||
| - React | ||||||
| - `react` | ||||||
| --- | ||||||
| - Nuxt | ||||||
| - `nuxt` | ||||||
| --- | ||||||
| - Vue | ||||||
| - `vue` | ||||||
| --- | ||||||
| - SvelteKit | ||||||
| - `sveltekit` | ||||||
| --- | ||||||
| - Astro | ||||||
| - `astro` | ||||||
| --- | ||||||
| - TanStack Start | ||||||
| - `tanstack-start` | ||||||
| --- | ||||||
| - Remix | ||||||
| - `remix` | ||||||
| --- | ||||||
| - Lynx | ||||||
| - `lynx` | ||||||
| --- | ||||||
| - Flutter | ||||||
| - `flutter` | ||||||
| --- | ||||||
| - React Native | ||||||
| - `react-native` | ||||||
| --- | ||||||
| - Vite | ||||||
| - `vite` | ||||||
| --- | ||||||
| - Other | ||||||
| - `other` | ||||||
| {% /table %} | ||||||
atharvadeosthale marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.