Update README with limitations for Cloudflare deployment
This update adds a new "Limitations" section in the README file, specifically for deploying to Cloudflare. The section covers the restrictions of the Edge runtime, potential need to adjust the application, and aspects to consider regarding latency. This information assists users' understanding of their deployment options and necessary adaptations of their application.
This commit is contained in:
14
README.md
14
README.md
@@ -328,7 +328,7 @@ No additional configuration is needed to deploy the application to Vercel. If yo
|
||||
|
||||
Since Vercel Edge runtime uses Cloudflare, the steps are similar to deploying to Cloudflare.
|
||||
|
||||
## Deploying to Cloudflare
|
||||
## Deploying to Cloudflare 🔥
|
||||
|
||||
To deploy the application to Cloudflare, you need to do the following:
|
||||
|
||||
@@ -338,6 +338,18 @@ To deploy the application to Cloudflare, you need to do the following:
|
||||
4. Switching CMS
|
||||
5. Setting Node.js Compatibility Flags
|
||||
|
||||
### 0. Limitations
|
||||
|
||||
Before you continue, **please evaluate the limitations of the Edge runtime**. The Edge runtime does not support all Node.js features, so you may need to adjust your application accordingly.
|
||||
|
||||
Cloudflare is cheaper and faster than many other providers, but running your application on Cloudflare Workers means not having access to the vast Node.js ecosystem.
|
||||
|
||||
Makerkit uses Cloudflare as baseline, so you can deploy it to Cloudflare Workers without any issues. However, you will need to keep in mind the limitations of the Edge runtime when adding new features.
|
||||
|
||||
One more thing to consider is that the Edge runtime does run close to your users, but may run far from your database. Consider read replicas or other strategies to reduce latency in all situations.
|
||||
|
||||
If your mind is set on using Cloudflare, please follow the instructions below.
|
||||
|
||||
### 1. Opting in to the Edge runtime
|
||||
|
||||
To opt-in to the Edge runtime, you need to do the following: open the root layout file of your app `apps/web/app/layout.tsx` and export the const runtime as `edge`:
|
||||
|
||||
Reference in New Issue
Block a user