-
Notifications
You must be signed in to change notification settings - Fork 87
docs: Restructure Deploy your app section with Custom hosting #539
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a63f945
docs: Restructure Deploy your app section with Custom hosting
developerjamiu 9153ec4
docs: Address review on Deploy your app restructure
developerjamiu 42d99f2
docs: Tighten Cloud page opener and improve description for SEO
developerjamiu c4ba7e2
docs: Note free trial and that the database is optional on Cloud page
developerjamiu 979210e
docs: Present Cloud free trial as an info callout
developerjamiu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Swiftaxe marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| --- | ||
| sidebar_label: Deploy to Serverpod Cloud | ||
| sidebar_class_name: sidebar-icon-deploy-to-cloud | ||
| description: Deploy your Serverpod Flutter backend to Serverpod Cloud in minutes, with zero configuration and a managed database, TLS, and scaling. | ||
| --- | ||
|
|
||
| # Deploy to Serverpod Cloud | ||
|
|
||
| [Serverpod Cloud](/cloud) is the recommended way to host a Serverpod server. It is a fully managed platform built and maintained by the Serverpod team, designed specifically for Serverpod apps. You deploy in minutes with zero configuration, and there is no VM setup, container configuration, or infrastructure to orchestrate yourself. | ||
|
|
||
| :::info | ||
|
|
||
| Your first project includes a one-month free trial, with no credit card required. | ||
|
|
||
| ::: | ||
|
|
||
| Cloud manages the production infrastructure for you: | ||
|
|
||
| - An optional production-grade Postgres database, with migrations applied automatically on each deploy. | ||
| - Networking, load balancing, and custom domains with TLS certificates. | ||
| - Automatic scaling to any size, with predictable pricing. | ||
| - A secure key manager for your app secrets. | ||
|
|
||
| ## Deploy from the terminal | ||
|
|
||
| You deploy with the `scloud` CLI: | ||
|
|
||
| 1. Install the `scloud` CLI. | ||
| 2. Run `scloud launch`. It creates the Cloud project, provisions a database if you enable one, and deploys your server. | ||
| 3. Set any app secrets (API keys, OAuth credentials) with `scloud password set`. | ||
|
|
||
| See the [Serverpod Cloud documentation](/cloud) for the full walkthrough, including secrets, custom domains, and logs. | ||
|
|
||
| To run the server yourself instead, see [Custom hosting](./custom-hosting/01-choosing-a-strategy.md). |
This file was deleted.
Oops, something went wrong.
53 changes: 53 additions & 0 deletions
53
docs/08-deployments/custom-hosting/01-choosing-a-strategy.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| --- | ||
| sidebar_label: Choosing a strategy | ||
| description: Choose how to self-host a Serverpod server, on a server cluster, a serverless platform, or your own machine, as an alternative to Serverpod Cloud. | ||
| --- | ||
|
|
||
| # Choosing a strategy | ||
|
|
||
| You can run a Serverpod server anywhere that supports a Dart process or a Docker container: a managed server cluster, a serverless platform, or your own machine. This page covers the trade-offs, and the following pages walk through each path. For the managed path, see [Serverpod Cloud](/cloud). | ||
|
|
||
| ## Server cluster or serverless? | ||
|
|
||
| The two main options are running on a cluster of servers or on a serverless platform. Run on a **cluster** (such as Google Cloud Engine) if your server holds state. Run **serverless** (such as Google Cloud Run) if your server is stateless. An example of a stateful server is [Pixorama](https://pixorama.live), where the server keeps live state in memory. If you only make API calls that read and write a database, serverless may be the better fit. | ||
|
|
||
| | | Server cluster | Serverless | | ||
| | :--- | :---------------------------------------------------------------------------------------- | :------------------------------------------------------------------ | | ||
| | Pros | All features are supported. Great for real-time communication. Cost-efficient at scale. | Minimal starting cost. Easier configuration. Minimal maintenance. | | ||
| | Cons | Slightly higher starting cost. More complex to set up. | Limited feature set. The server cannot hold state. | | ||
|
|
||
| Serverless does not support: | ||
|
|
||
| - Future calls. (Possible to configure, but requires a more advanced setup.) | ||
| - Health metrics. | ||
| - On-server caching. Caching can still happen while a serverless instance stays warm, but it can be lost at any time. Caching with Redis is supported. | ||
| - In-memory state. Store shared state in an external service such as Postgres, Redis, or another API instead. | ||
|
|
||
| ## Pick a guide | ||
|
Swiftaxe marked this conversation as resolved.
|
||
|
|
||
| - [Google Cloud Engine with Terraform](./02-google-cloud-engine-terraform.md): server cluster on GCP. | ||
| - [Google Cloud Run with GCP Console](./03-google-cloud-run-console.md): serverless on GCP. | ||
| - [AWS EC2 with Terraform](./04-aws-ec2-terraform.md): server cluster on AWS. | ||
| - [Hosting elsewhere](./05-hosting-elsewhere.md): run Serverpod on any Dart or Docker host. | ||
| - [Community-supported deployments](./06-community-supported.md): tools built by the community. | ||
|
|
||
| ## Approximate costs | ||
|
|
||
| A minimal **server cluster** on Google Cloud Platform: | ||
|
|
||
| | Service | Min cost | | ||
| | :----------------------- | :------- | | ||
| | Compute Engine Instance | $7 / mo | | ||
| | Cloud Load Balancing | $19 / mo | | ||
| | Cloud SQL for PostgreSQL | $10 / mo | | ||
|
|
||
| A minimal **serverless** setup on Google Cloud Run, where you only pay for the traffic you serve and no load balancer is required: | ||
|
|
||
| | Service | Min cost | | ||
| | :----------------------- | :------- | | ||
| | Cloud Run | $0 / mo | | ||
| | Cloud SQL for PostgreSQL | $10 / mo | | ||
|
|
||
| :::info | ||
| These prices are rough approximations to give you a sense of hosting costs. Actual costs vary and change over time. Do your own research before provisioning infrastructure. | ||
| ::: | ||
2 changes: 1 addition & 1 deletion
2
...loyments/02-deploying-to-gce-terraform.md → ...sting/02-google-cloud-engine-terraform.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...eployments/03-deploying-to-gcr-console.md → ...om-hosting/03-google-cloud-run-console.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
docs/08-deployments/04-deploying-to-aws.md → ...ts/custom-hosting/04-aws-ec2-terraform.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "label": "Custom hosting", | ||
| "position": 2, | ||
| "className": "sidebar-icon-custom-hosting" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.