-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Update deploying docs for clarity #310
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 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,15 +5,25 @@ banner: | |
🆕 Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.15</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15">migration instructions.</a> | ||
--- | ||
|
||
Because this SaaS app is a React/NodeJS/Postgres app built on top of [Wasp](https://wasp-lang.dev), we will direct you to the [Wasp Deployment Guide](https://wasp-lang.dev/docs/advanced/deployment/overview/) for more detailed instructions, except for where the instructions are specific to this template. | ||
Because this SaaS app is a React/NodeJS/Postgres app built on top of [Wasp](https://wasp-lang.dev), Open SaaS can take advantage of Wasp's easy, one-command deploy to Fly.io or manual deploy to any provider of your choice. | ||
|
||
The simplest and quickest option is to take advantage of Wasp's one-command deploy to [Fly.io](#deploying-to-flyio) (`wasp deploy`). | ||
The simplest and quickest option is to take advantage of Wasp's one-command deploy to Fly.io. | ||
|
||
Or if you prefer to deploy to a different provider, or your frontend and backend separately, you can follow the [Deploying Manually](#deploying-manually--to-other-providers) section below. | ||
|
||
If you're looking to deploy your Astro Blog, you can follow the [Deploying your Blog](#deploying-your-blog) section at the end of this guide. | ||
Or if you prefer to deploy to a different provider, or your frontend and backend separately, you can follow the Deploying Manually section below. | ||
|
||
## Deploying your App | ||
### Steps for Deploying Properly | ||
|
||
These are the steps necessary for you to deploy your app properly. We recommend you follow these steps in order | ||
|
||
|
||
- [ ] Get your [production API keys and environment variables](#prerequisites) | ||
- [ ] [Deploy your app](#deploying-to-flyio) | ||
|
||
- [ ] Add the correct [redirect URL's to your social auth credentials](#adding-server-redirect-urls-to-social-auth) | ||
- [ ] Set up your [production webhooks for either [Stripe](#setting-up-your-production-stripe-webhook) or [Lemon Squeezy](#setting-up-your-production-lemon-squeezy-webhook) | ||
- [ ] Set your [production environment variables](#other-vars) on your deployed apps | ||
- [ ] (Optional) [Deploy your blog](#deploying-your-blog) | ||
|
||
Each of these steps is covered in more detail below. | ||
|
||
### Prerequisites | ||
|
||
|
@@ -104,7 +114,7 @@ After deploying your server, you need to add the correct redirect URIs to the cr | |
- [Google Auth](https://wasp-lang.dev/docs/auth/social-auth/google#3-creating-a-google-oauth-app:~:text=Under%20Authorized%20redirect%20URIs) | ||
- [Github Auth](https://wasp-lang.dev/docs/auth/social-auth/github#3-creating-a-github-oauth-app:~:text=Authorization%20callback%20URL) | ||
|
||
### Setting up your Stripe Webhook | ||
### Setting up your Production Stripe Webhook | ||
|
||
Now you need to set up your stripe webhook for production use. Below are some important steps and considerations you should take as you prepare to deploy your app to production. | ||
|
||
|
@@ -165,6 +175,23 @@ export const stripe = new Stripe(process.env.STRIPE_KEY!, { | |
wasp deploy fly cmd --context server secrets set STRIPE_WEBHOOK_SECRET=whsec_... | ||
``` | ||
|
||
### Setting up your Production Lemon Squeezy Webhook | ||
|
||
To set up your Lemon Squeezy webhook, you'll need the URL of you newly deployed server + `/payments-webhook`, e.g. `https://open-saas-wasp-sh-server.fly.dev/payments-webhook`. | ||
|
||
With the webhook url ready, go to your [Lemon Squeezy Webhooks Dashboard](https://app.lemonsqueezy.com/settings/webhooks): | ||
- click the `+` button. | ||
- add the webhook forwarding url to the `Callback URL` section. | ||
- give your webhook a signing secret (a long, random string). | ||
- add this signing secret to your server's production environment variables under `LEMONSQUEEZY_WEBHOOK_SECRET=` | ||
- make sure to select at least the following updates to be sent: | ||
- order_created | ||
- subscription_created | ||
- subscription_updated | ||
- subscription_cancelled | ||
- click `save` | ||
|
||
|
||
## Deploying your Blog | ||
|
||
Deploying your Astro Starlight blog is a bit different than deploying your SaaS app. As an example, we will show you how to deploy your blog for free to Netlify. You will need a Netlify account and [Netlify CLI](https://docs.netlify.com/cli/get-started/) installed to follow these instructions. | ||
|
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.
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.
Hah, why Properly?