Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obtaining DB_URL from the CLI #2964

Open
Innoviox opened this issue Dec 10, 2024 · 1 comment
Open

Obtaining DB_URL from the CLI #2964

Innoviox opened this issue Dec 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Innoviox
Copy link

Is your feature request related to a problem? Please describe.
I am attempting to set up branch previews (similar to Vercel) in railway. To do this, I need to update some environment variables on the railway side, including SUPABASE_DB_URL.

Describe the solution you'd like
I'd like to be able to run some supabase CLI command to obtain the DB_URl automatically, so I don't have to add it manually as a variable whenever I make a new branch. However, I cannot find a CLI command that will do this. gen keys gives me the password but not the user, the port, the database, or the host. branches get has the user, port, and host, but these conflict with the information shown in my dashboard. (I assume the database is always postgres?)

Describe alternatives you've considered
I've looked in the docs for the CLI and the javascript library, and neither of them seems to provide the database url. Any help is appreciated!

@sweatybridge sweatybridge added the enhancement New feature or request label Dec 11, 2024
@sweatybridge
Copy link
Contributor

Hi @Innoviox, thanks for the suggestion.

We can definitely make branches get more useful by adding a --output env flag to format the output. We already have a list of envs that users typically want exposed. These include both pooling (shown in cli) and non-pooling (shown on dashboard) db urls.

I will probably have time to look into this early 2025.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants