-
Notifications
You must be signed in to change notification settings - Fork 254
Doc: Add vercel to Appwrite sites migration guide #2054
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?
Conversation
title: Migrating from Vercel to Appwrite Sites | ||
description: A step-by-step guide to migrate your web applications from Vercel to Appwrite Sites. | ||
--- | ||
|
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.
# Understanding domain rule types | ||
|
||
When adding a domain in Appwrite, you can choose from three rule types: | ||
|
||
{% table %} | ||
- Rule Type | ||
- Description | ||
- Use Case | ||
|
||
--- | ||
|
||
- Active deployment | ||
- Points to the latest successful deployment | ||
- Production environments | ||
|
||
--- | ||
|
||
- Git branch | ||
- Points to deployments from a specific branch | ||
- Staging or testing environments | ||
|
||
--- | ||
|
||
- Redirect | ||
- Forwards traffic to another URL | ||
- Domain migrations or creating shortcuts | ||
{% /table %} | ||
|
||
{% info title="Redirect limitations" %} | ||
When using domain-level redirects in Appwrite, path and query parameters are ignored. For example, if you redirect `example.com` to `appwrite.io`, then `example.com/docs?id=123` will redirect to `appwrite.io` (not `appwrite.io/docs?id=123`). | ||
{% /info %} |
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.
This section is redundant
We can just mention the three types and link to Domain rule types here: https://appwrite.io/docs/products/sites/domains#domain-rule-types
After setting up your project and domain, you'll need to configure your build settings to match your Vercel configuration. | ||
|
||
{% section id="build-settings" step=1 title="Set up build configuration" %} | ||
Navigate to your site > **Settings** > **Build settings** and configure the following: | ||
|
||
- **Framework:** Select the same framework as in Vercel | ||
- **Install command:** Enter the same install command from Vercel | ||
- **Build command:** Enter the same build command from Vercel | ||
- **Output directory:** Enter the same output directory from Vercel | ||
- **Root directory:** If your app is in a monorepo subdirectory, specify the path | ||
- **Rendering:** Select the appropriate rendering mode (Static or SSR) | ||
|
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.
Let's mention about framework autodetection here
# Framework defaults | ||
|
||
Appwrite automatically detects and applies default settings for popular frameworks: | ||
|
||
{% table %} | ||
- Framework | ||
- Install command | ||
- Build command | ||
- Output directory | ||
|
||
--- | ||
|
||
- Next.js | ||
- `npm install` | ||
- `npm run build` | ||
- `./.next` | ||
|
||
--- | ||
|
||
- Nuxt | ||
- `npm install` | ||
- `npm run build` | ||
- `./.output` | ||
|
||
--- | ||
|
||
- SvelteKit | ||
- `npm install` | ||
- `npm run build` | ||
- `./build` | ||
|
||
--- | ||
|
||
- Angular | ||
- `npm install` | ||
- `npm run build` | ||
- `./dist/angular/browser` | ||
|
||
--- | ||
|
||
- Astro | ||
- `npm install` | ||
- `npm run build` | ||
- `./dist` | ||
{% /table %} |
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.
This section is redundant. We can link the project dependencies docs to check the defaults: https://appwrite.io/docs/products/sites/develop#project-dependencies
Appwrite automatically injects these variables into your site: | ||
|
||
{% table %} | ||
- Variable | ||
- Description | ||
- Available At | ||
|
||
--- | ||
|
||
- `APPWRITE_SITE_API_ENDPOINT` | ||
- API endpoint of the site | ||
- Build & Runtime | ||
|
||
--- | ||
|
||
- `APPWRITE_SITE_NAME` | ||
- Name of the site | ||
- Build & Runtime | ||
|
||
--- | ||
|
||
- `APPWRITE_SITE_DEPLOYMENT` | ||
- Deployment ID | ||
- Build & Runtime | ||
|
||
--- | ||
|
||
- `APPWRITE_SITE_PROJECT_ID` | ||
- Project ID | ||
- Build & Runtime | ||
{% /table %} | ||
|
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.
We have a partial for this: https://github.com/appwrite/website/blob/main/src/partials/sites-env-vars.md
What does this PR do?
Adds vercel to sites migration guide
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)