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

Allow for more fine-tuned configuration in local dev environments #2191

Closed
Matsuuu opened this issue Apr 19, 2024 · 2 comments
Closed

Allow for more fine-tuned configuration in local dev environments #2191

Matsuuu opened this issue Apr 19, 2024 · 2 comments

Comments

@Matsuuu
Copy link

Matsuuu commented Apr 19, 2024

Is your feature request related to a problem? Please describe.

This is a continuation to what #1518 wants to have added to the CLI interfaces.

When working in local dev environments, a lot of things might differ from the actual prod setups. There might be different environment variable files, there might be multiple different seeding profiles for different data use cases, and so on.

Describe the solution you'd like

Create an easy way for us to expand the API by allowing the addition of different flags to maps varying file mappings in all supabase commands. Some examples of what would be beneficial:

  • a --env-file mapping for ALL commands. This would allow using multiple different env files as well as make it easier to host local setups in OS's that don't have the easiest of ways to add env variables cough windows cough.

  • a --seed-file mapping to db reset etc. commands. This would allow users to have more fine grained control around seeding, as well as allow the seed.sql to be used for actually seeding e.g. staging environment dumps. This would allow more varied usage of seeding with the database without having to overwrite files.

  • I'm sure there's plenty more.

Describe alternatives you've considered

One way of approaching this might be just having the API's take these variables but as with e.g. the env one, it would be easier if there was a general utility that could handle these as they would need to be retrofitted to all endpoints otherwise.

Additional context

I've looked at the CLI database quite a lot before and would like to contribute to it. If this is something that would accept a PR for, I could maybe take a look at it.

@sweatybridge
Copy link
Contributor

related #2026

@sweatybridge
Copy link
Contributor

We have added npx supabase@beta seed buckets command.

The long term plan is to expand this top level command to seed users and run seed.sql against staging db.

Thanks for taking time to make this suggestion.

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

No branches or pull requests

2 participants