I’m new to Directus (just setting up), and I didn’t find the answer in the docs nor in the forum - sorry if it has already been answered!
I already have a Supabase (cloud) project, and I would like to connect Directus to this existing database, to offer a simple way to interact with data for non-tech users.
I created a project on Directus Cloud version, but never saw an option to connect an existing database.
I also tried to self-host Directus with Pikapods: never saw this option either.
You can only connect an existing database when you self-host Directus, since Directus Cloud manages its own database and doesn’t allow external connections.
If you’re self-hosting, you’ll need to set these environment variables with your Supabase credentials:
ENETUNREACH sounds like a networking error like you'd find when the internet connection is down. Maybe Elestio isn't configured to allow traffic out of the network? When using Docker Compose, usually you have to explicitly allow the container to access the host network to be able to reach the internet, so that could definitely be the reason why it's not able to connect to the database. Might be worth trying network mode "host" https://docs.docker.com/reference/compose-file/services/#network_mode
Hello, try to also add the DB_SSL as true in the docker compose and see if it works.
– ahmad_quvorThanks, I tried but I get the same error... any other idea?
– Manon
– rijkvanzantenENETUNREACHsounds like a networking error like you'd find when the internet connection is down. Maybe Elestio isn't configured to allow traffic out of the network? When using Docker Compose, usually you have to explicitly allow the container to access the host network to be able to reach the internet, so that could definitely be the reason why it's not able to connect to the database. Might be worth trying network mode "host" https://docs.docker.com/reference/compose-file/services/#network_mode