Skip to content

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

Closed

Description

@jonniedarko

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 😃

Activity

  1. 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][/+] on Mar 29, 2024
  2. sweatybridge commented on Apr 15, 2024

    @sweatybridge
    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.

  3. added
    documentationImprovements or additions to documentation
    and removed
    enhancementNew feature or request
    on Apr 15, 2024
  4. added this to the P1 milestone on Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions