How do I use primo with cloudflare pages?

This might be stupid but how do I use primo? In their docs they use vercel/netlify and input project api keys from supabase into vercel/netlify. Here are the docs: https://docs.primocms.org/getting-started How would I achieve the same in cloudflare pages? I'm assuming all three are just ways to host static websites, except vercel which I believe can host dynamic websites too. I don't get why primo needs supabase anyway, I assume it's just some database management software. Please correct me if I've made a mistake.
Primo Docs: Getting Started
You can download Primo as a desktop application or host it from any static host.
9 Replies
z0rrn
z0rrn2mo ago
Primo is no ordinary static site, it uses Functions/Lambda/Workers to do things not possible in the Browser (these are little JavaScript files which get executed on every request). This is supported by Vercel, Netlify and Cloudflare (but with different usage limits, in my opinion cf has the highest). This is what you call dynamic websites. Primo needs Supabase to store information (so-called state) because each of these functions are stateless (they store no information). To deploy Primo on Cloudflare, follow step 2 and 3, then create a new Cloudflare Pages project. Choose your desired Subdomain. In the next screen choose the SvelteKit Template. Now configure the Environment Variables under the Environment Variables Dropdown (the Video shows how to access them in Supabase). Now your project should be deployed normally like on Vercel. If you have any other questions or issues, do not hesitate to ask. We'll help you!
foo9ar
foo9ar2mo ago
Thank you so much for your explanation! That clears things up. I set up a new GitHub repo to use the sveltekit template but then I found this under the Integrations (Beta) heading:
No description
foo9ar
foo9ar2mo ago
Just to clear things up, I manually uploaded the files for my website for my first cloudflare pages project instead of using a GitHub repo so it never asked me for the Build settings. I think I understand how to add the environment variables in the git version but do I have to delete my old project and start anew? Is there anyway to get these Build Settings on my old project or allow cloudflare to use my repository on GitHub? In short, how would I go about changing from manual upload to direct git repository?
foo9ar
foo9ar2mo ago
I will dunk my head in a bucket, I am beyond stupid, thank you for all your help! I'll flag this post solved, even though I do have a few questions remaining.
No description
foo9ar
foo9ar2mo ago
Okay nevermind, I decided to create a new cloudflare pages project and this time use a GitHub repo, all is well! Should I create a new thread for this? I followed all the instructions and the website is now live at https://primo-6v2.pages.dev/ but it returns a 404
foo9ar
foo9ar2mo ago
I don't think all the assets got uploaded from the repo:
No description
foo9ar
foo9ar2mo ago
here's the build log:
z0rrn
z0rrn2mo ago
Hello, I had the same issue deploying on Cloudflare so I think it's an issue on primo's site.
foo9ar
foo9ar2mo ago
Oh you're the same person from the primo server Thanks for the info
Want results from more Discord servers?
Add your server
More Posts
Failed: an internal error occurred.Hello everyone, I am trying to deploy nuxt, but the deployment failed when my files exceeded 1000, Cloudflare Expert Needed for Webflow & WordPress IntegrationNeed help in troubleshooting and resolving a specific issue we've encountered while integrating our Can people that only supports IPv4 connect to my website hosted on IPv6 with Cloudflare Anti-DDOSHello there ! This might sound like an odd question but my ISP only allows me to open my posts on IPR2 multipart upload complete function is taking a large amount of cpu time.When looking at the metrics for our worker that handles file uploads we are noticing that the "complNo idea why e2e response time is too high than in my logHi My request took too long and I want to debug, but I have no idea with this, I've calculated by myFailed: an internal error occurred.Trying to get my next app running on pages and everything seem to build ok till i get this error: 'Want to host product pages on Webflow & Blogs on WordPressHello all, We're in the process of integrating our new Webflow site with an existing WordPress blogMigrated to `wrangler.toml` - getting "Deployment failed" in dashboardAfter reading https://blog.cloudflare.com/pages-workers-integrations-monorepos-nextjs-wrangler, I deHow does the caches.default interact with fetch by default?In the screenshot (https://developers.cloudflare.com/workers/reference/how-the-cache-works/#cache-apAppending Content-Security-Policy-Report-Only Header to All ResponsesI'm looking for some troubleshooting help/guidance regarding attempts to add a Content Security Poli