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

Can we get a supabase stop --all to stop all running local projects [Feature request] #2104

Open
jonniedarko opened this issue Mar 29, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@jonniedarko
Copy link

jonniedarko commented Mar 29, 2024

Is your feature request related to a problem? Please describe.
As a Developer who uses Supabase for almost all projects I can I want to be able to stop any and all local Supabase projects so that switch between many projects with as little friction as possible.

I use Supabase locally on most projects I start now and I often switch between them on any given day. Its easy to forget I have Supabase running in another project until I realise I need to free up local resources (I run llms and other docker images locally ). it slows me down and breaks my focus when I need to find the project thats eating my resources and stop the ones I no longer need.

Describe the solution you'd like
It would be great if we could have a supabase stop --all to stop all local instances.

Describe alternatives you've considered
Another option could be a supabase ls command to list all local running projects (possibly with a --all flag for all local projects) that could be piped into supabase stop --project-id ....

I am not sure what the best approach is for this but one potential idea is supporting a global config file that persists all local projects ids:
~/.supabase/config.yml ?

And while out of scope for this request, It could also potentially offer an avenue for extended features later such as overrides for default settings, support multiple project folders for single Supabase project (multi repo vs mono repos) and local templates for quick set up (e.g. maybe a common Supabase function starting point 🤷) or reduced need for multiple instances of same docker images.

Additional context
I would be happy Love to contribute to this in anyway I can with some guidance 😃

@jonniedarko jonniedarko changed the title Can we get a supabase stop --all to stop all running projects [Feature request] Can we get a supabase stop --all to stop all running local projects [Feature request] Mar 29, 2024
@sweatybridge sweatybridge added the enhancement New feature or request label Apr 15, 2024
@sweatybridge
Copy link
Contributor

You can list all locally running supabase containers using a docker filter, for eg.

$ docker ps -f 'name=supabase_db' --format '{{ .Names }}'
supabase_db_cli

After that you can cut the id and pipe to supabase stop --project-id ... via bash.

I'm not sure how useful it would be to have a global config because the services for different local projects all need to expose separate ports, and sometime separate service versions.

@sweatybridge sweatybridge added documentation Improvements or additions to documentation and removed enhancement New feature or request labels Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants