-
Notifications
You must be signed in to change notification settings - Fork 342
Description
Is your feature request related to a problem? Please describe.
Yes, the problem is having supabase containers running all day on my pc because I forget to stop it. This option to me makes sense because I don't mind having to run supabase start everytime but to me is worse to forget to run supabase stop. Maybe is not a big deal but for me it would make sense to be the default behaviour since I use supabase cli for dev local env, idk who would want supabase to be running on they're pc's at all time unless they are using it for smt else that I'm not.
Describe the solution you'd like
Adding an '-f' option so you can specify that you want to stop it when terminal is closed like supabase start -f
Describe alternatives you've considered
npx supabase start && trap 'npx supabase stop' EXIT INT TERM HUP && sleep infinity
Additional context
I'm using supabase for many full stack projects. I undertand one concern to not do this is that you may have to handle gracefuly db shutdown because if you do it on middle of a migration it could break the db, but since this is a dev environment and also you won't likely be closing your cli while running another commands I think it may just fine.