Drizzle with self hosted supabase not working
Hello, I created a self hosted instance of supabase on my machine. I am also using nextjs. Because of that I need to be using neon driver to connect to supabase instance.
This is how I create connection
I have my instance hosted on machine
192.168.50.88
Now when I try to push newly generated migration I am getting
my connection string is DATABASE_URL=postgres://postgres.<my password>@192.168.50.88:5432/postgres
4 Replies
Same config works just fine with official supabase instance. How can I disable these ssl checks when pushing migrations? Also how can I specify a url when making migrations?
b
Hi Pacto, I'm also self-hosting supabase on coolify (docker based) and tring to access my db from the outside in a nextjs app with drizzle. I'm getting confused about the documentation. This page: https://orm.drizzle.team/learn/tutorials/drizzle-with-supabase says connection pooling is mandatory BUT here: https://orm.drizzle.team/docs/get-started-postgresql#supabase it says connection pooling is optional. I dont want to use pooling because I'll have to figure out a separated pooler etc.. is connection pooler mandatory or not to use with drizzle orm ? As a self-hosted instance of supabase on a vps is NOT serverless, I don't see with it should be mandatory rather than direct connection.
Drizzle ORM - Drizzle with Supabase Database
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Drizzle ORM - PostgreSQL
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Well, It used to work for me with direct connection in Nextjs without an issue, but then I started checking if user is authenticated in my middleware which then bricked because of postgres not supporting some functionality.
What is your self hosted setup? Did you manage to connect? I am hosting on my own server, but also tried on localhost. So far I was unable to even push my migrations, I will try with the supabase CLI later today probably
I’m self hosting supabase with coolify on a hetzner vps
Today I managed to expose my postgres db by editing and exposing ports in the docker compose file
I also use drizzle orm
And have successfully generated migration and ran them
only my supabase instance is self hosted, im building a nextjs app deployed on vercel and using drizzle orm to connect your my self hosted supabase
I’ll need to try things out but so far its ok
I didnt try auth yet but it should work