edgedb / nextjs-edgedb-auth-template

A minimal starter designed to help you get up and running with EdgeDB and Next.js quickly. It includes a basic setup for authentication, EdgeDB schema, and a UI to get you started.
https://nextjs-edgedb-auth-template-kappa.vercel.app
30 stars 8 forks source link

Deployment tutorial #7

Open TimurKr opened 6 months ago

TimurKr commented 6 months ago

Hey! This is a great starting guide for auth and next.js, but naturally, the next step would be deploying this. I spent some time trying to figure it all out and couldn't. Admittedly I am very new to EdgeDB, so bear with me :) I wanted to use the GitHub integration as well as the Vercel integration, to get a new DB branch for each git branch. But then how do I handle setting up the auth on each branch? Or is that already set up? Als other redirect when setting up the UI always need to point to the correct branch deployment to work in the vercel preview environment. All in all, sound good on paper, but there is a lot more to it to get it actually working.

All of this is a little too overwhelming for someone very new to this. Ideally, the steps in the README would walk the user through setting up the deployment as well, especially since having it run locally is quite useless if you can't publish it and have a reliable CICD pipeline.

Thanks for any tips!

beerose commented 1 month ago

Hi @TimurKr!

But then how do I handle setting up the auth on each branch?

The new branch configuration will be identical to the main branch. We have a script now (prebuild) that handles setting the auth config for preview deployments.

We will include a more detailed README section. In the meantime, we have added a Vercel deployment button, so you can also deploy it using your Vercel account: LINK