community-content icon indicating copy to clipboard operation
community-content copied to clipboard

Deploy Strapi to Cloudflare Pages

Open sschweimler opened this issue 2 years ago β€’ 12 comments

My Request

Community vote πŸ‘ Upvote if you like this topic πŸš€ If you can make the article/video!

Thank you.

sschweimler avatar Sep 03 '22 13:09 sschweimler

Hi, @PaulBratslavsky I will like to work on this.

Ashimi0x avatar Sep 06 '22 14:09 Ashimi0x

Hi,

after some research I donβ€˜t think itβ€˜s possible since cloudflare pages is for static site hosting and strapi is a dynamic web app.

Abdulwahab Ashimi @.***> schrieb am Di. 6. Sept. 2022 um 16:33:

Hi, @PaulBratslavsky https://github.com/PaulBratslavsky I will like to work on this.

β€” Reply to this email directly, view it on GitHub https://github.com/strapi/community-content/issues/955#issuecomment-1238237744, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSUNMIH2ERQ3H364FMCRYDV45I3FANCNFSM6AAAAAAQD4SM3A . You are receiving this because you authored the thread.Message ID: @.***>

sschweimler avatar Sep 06 '22 16:09 sschweimler

@ibn-ashimi and @sschweimler maybe you can host Strapi on some other platform and host your UI on Cloudflare and implement a hook that will redeploy your frontend on cloudflare whenever content in Strapi changes.

PaulBratslavsky avatar Sep 07 '22 22:09 PaulBratslavsky

This is similar to like hosting Ghost on your own desktop with an SSG like Eleventy deployed on Netlify. If Ibn-Ashimi leaves it, choose me second please. I'd like to write it. @PaulBratslavsky

shammadahmed avatar Sep 08 '22 10:09 shammadahmed

Let us know @ibn-ashimi if you are still interested πŸ‘ Thanks @shammadahmed , we will let you know

dessireugarte avatar Sep 13 '22 12:09 dessireugarte

Hi please can I write about this topic

Bishopukpai avatar Sep 13 '22 14:09 Bishopukpai

@dessireugarte I am already working on something else. Thank you.

Ashimi0x avatar Sep 13 '22 22:09 Ashimi0x

Thanks man @ibn-ashimi

@dessireugarte Please assign it to me and you can add the 'in progress' label to it.

shammadahmed avatar Sep 13 '22 22:09 shammadahmed

@ibn-ashimi since you are working on something else I will assign it to @shammadahmed.

When ever you have an outline, please share it here. Thank you.

PaulBratslavsky avatar Sep 21 '22 17:09 PaulBratslavsky

@shammadahmed Are you on twitter? whats your handle?

Ashimi0x avatar Sep 21 '22 20:09 Ashimi0x

@PaulBratslavsky Since Heroku is ending the free tier in November, my tutorial will use Render to deploy the backend. Here is the outline:

  • Introduction
  • Strapi - a headless CMS
  • Cloudflare Pages - a JAMstack platform
  • Goals
  • Prerequisites
  • Choose a hosting platform for Strapi
  • Deploy the backend
  • Add content
  • Choose a UI
  • Deploy the frontend
  • Automatically redeploy with webhooks
  • Conclusion

@ibn-ashimi It's the same as here.

shammadahmed avatar Sep 21 '22 20:09 shammadahmed

Cool. Followed you @shammadahmed

Ashimi0x avatar Sep 21 '22 22:09 Ashimi0x

@PaulBratslavsky @dessireugarte I am mostly done with the article, could you guys please confirm the outline first so I can post the link for review?

shammadahmed avatar Oct 15 '22 22:10 shammadahmed

@shammadahmed can you add a section talking about SEO and why it is important, and how JAMstack apps help with that? And in your Strapi app, you can use the SEO plugin and add that metadata in the Cloudflare pages website.

PaulBratslavsky avatar Oct 18 '22 20:10 PaulBratslavsky

@PaulBratslavsky The tutorial has come about pretty solid (about 2700 words). I have used the Strapi starter templates for deployment, with Strapi on Render and Gatsby on Cloudflare Pages. Readers would be able to easily follow step by step to deploy on Cloudflare Pages and connect with webhooks.

My take on the SEO section is that it would block the readers' flow in deploying the site, but I can surely add the section if you guys want.

This is my first article for Strapi and I have worked hard on it. You guys would like it.

shammadahmed avatar Oct 18 '22 21:10 shammadahmed

@shammadahmed ok thanks for the context, we can leave out the above-mentioned recommendation around SEO. When ready can submit the draft for review.πŸ™‚

PaulBratslavsky avatar Oct 19 '22 12:10 PaulBratslavsky

@PaulBratslavsky Awesome man. The draft is ready, I just need to add keywords, and proofread it.

About that SEO topic: I was reading about SEO and JAMstack yesterday. I found it very interesting how JAMstack makes very search-friendly websites possible since crawlers like static sites. I would love to write a article/tutorial on it covering everything from the theory to the Strapi SEO plugin. What are your thoughts?

shammadahmed avatar Oct 19 '22 13:10 shammadahmed

@PaulBratslavsky @TiaraOluwanimi It is ready, hope you guys like it: https://www.dropbox.com/scl/fi/9u4chsqq7q8ujqf7hywlt/How-to-Deploy-Strapi-on-Cloudflare-Pages.paper?dl=0&rlkey=hrf5ta2hqmtj9g5r5g2ebh58r

@dessireugarte It is labeled 'article', though it is a tutorial.

shammadahmed avatar Oct 23 '22 20:10 shammadahmed

Thanks @shammadahmed πŸ‘‹ We will review the draft. I'll get back to you.

dessireugarte avatar Oct 27 '22 07:10 dessireugarte

Hello @shammadahmed πŸ‘‹ Just wanted to let you know that your article will be published around the first week of December. I'll let you know if we need any changes or when it is published!

dessireugarte avatar Nov 15 '22 20:11 dessireugarte

@dessireugarte This is very good news. Thank you for your guys' part. I am looking forward to when it gets live.

shammadahmed avatar Nov 15 '22 20:11 shammadahmed

Stumbled upon this looking for a way to run Strapi on Cloudflare Pages, rather than just deploying Strapi content to Cloudflare Pages.

Its a common misconception that Cloudflare Pages is static content only, akin to GitHub Pages, however that is not the case. Cloudflare Pages is some tooling atop of Cloudflare Workers + KV to offer edge based serving of static and dynamic content, akin to Vercel's deployment platform, but with all the benefits of Cloudflare: cdn, ddos protection, workers, kv, d1, r2, queue, stream, access, warp, argo, etc. Where Vercel has Next, Cloudflare has Remix and Astro.

Personally, I'm planning to build a few Remix apps and Astro websites that use Strapi for its access to KV, D1, and R2.

balupton avatar Nov 29 '22 04:11 balupton

@shammadahmed I added some minor comments in your draft, let me know if they make sense or if you have questions.

PaulBratslavsky avatar Dec 09 '22 15:12 PaulBratslavsky

@PaulBratslavsky Thanks for the review man.

Advanced tab env variables & Render memory limit: I think you have missed the block quotes while reading: I mention the solution for both the environment variables error and Render free plan memory limit issues.

API Token: I left the token generation part for later so the article achieves a chronological flow so the reader can deploy the template quickly to production in one go. But if you say, I can explain it there as well or just add an in-article link to that part there.

Let me know if I misunderstood any of the comments.

shammadahmed avatar Dec 09 '22 16:12 shammadahmed

Hello @shammadahmed πŸ‘‹Β  Your article is live! πŸŽ‰ Great job! Please register to our forum by clicking on the discussion at the bottom of your post, so you automatically receive notifications when someone adds comments. Also, please follow the guidelines to issue and submit an invoice.

You should register yourself once as an "Individual Vendor" in this form, please let me know if you have any questions about the form. Just be aware that in the W-8BEN form:

  • 5 is not mandatory
  • 6a & 6b are only necessary if you have a tax number in your own country.

Then you can submit your invoice here, and soon you will receive your payment. If you want to promote your article, here are some ideas and templates that might help you! Please feel free to reach out to me if you have any questions!

dessireugarte avatar Dec 15 '22 19:12 dessireugarte