i’ve grabbed the connection URL from the cluster’s connect tab but when i try to fire up drizzle studio or push some schema changes it throws ENOTFOUND
error
Hi @777advait, the MPG endpoint/s are only accessible via your org’s private network. So to connect locally, you’ll want to proxy to your cluster fly mpg proxy
or for a more persistent connection you can connect to WireGuard from your local machine.
You can use fly as a front-end to wireguard like this:
fly proxy 5433:5432 -a your_app_name
(to access it locally at 5433.)
since we can only connect to a managed postgres instance via wireguard proxy, i wanted to know a few things:
- if i had to share database access to my team members will i have to add them to my fly.io org since you can’t directly connect to it via the connection string,
- i have a github action that runs db migration command if any changes have been pushed to my packages/db directory, but how can i connect to the database in a ci/cd environment?
- when i attach the database to my app or connect to it via proxy from local dev environment is it connecting via the pooled connection string or direct?
EDIT: i havent used wireguard before but by persistent connection i believe you mean i can fire up wireguard in background and then use the connection string normally? and ask my team members to do the same too right?
There’s a more idiomatic way of doing this part, as mentioned in this other, very recent forum thread:
Aside: As I understand it, you get Support as part of the Managed Postgres package. It would probably be better to use the dashboard portal, rather than posting here in the community forum. That way, your questions are formally lodged within their ticketing system, etc.
What’s included
[…]
Fly.io Support Portal to log tickets and get help