How to use the supabase cli to connect to a local supabase docker instance ?
I can't see how it's done. I tried every command. Am I just dumb or am I missing something ?
https://supabase.com/docs/guides/self-hosting/docker
I used this to set everything up.
Self-Hosting with Docker | Supabase Docs
Learn how to configure and deploy Supabase with Docker.
12 Replies
To connect how? what are you trying to do?
I need to pull the schemas from that database. and To do that I need to use link, and to do that I need to use login.
What does connect to it mean? please show the command you are trying to run
supabase link
only works with the hosted instance.
If you are working with self-hosted or any docker variants then you use the --db-url flag and pass the db connection string to it.I did try it. didn't work. I am re-installing everything using the cli itself and see if it works better that way.
It's best you explain what you are doing here, because I'm not sure how you would have a local supabase docker instance and still try to pull the db schema, where are you pulling the schemas to?
Pull will just create a migration file. I will use the file for whatever I need it for obv.
thanks for the help. I am re-installing everything rn and will mark as solved if I can connect to the db.
What did you pass to the
--db-url
flag?database string
Yeah what does it look like? it's local on your machine right? don't put the password in the version you will type here.
Also did you try connecting to it via a GUI database tool like TablePlus, Beekeeper Studio, Datagrip or pgAdmin?
No. just CLI.
Try with a GUI database tool just to be sure you can actually connect. If it's not connecting then the local docker instance isn't exposing the port correctly.
Sure.
I am throwing the towel on this one. the cli installation is even worst than just cloning the fron git.
will see other solutions.