From 8a118976bf969f58491f1a0f6a04571825871b7a Mon Sep 17 00:00:00 2001 From: Qiao Han Date: Wed, 25 Jan 2023 11:58:10 +0800 Subject: [PATCH 1/3] chore: add memory requirement to readme --- docs/supabase/start.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/supabase/start.md b/docs/supabase/start.md index a5ca6508dd..65316280ca 100644 --- a/docs/supabase/start.md +++ b/docs/supabase/start.md @@ -6,4 +6,6 @@ Requires `supabase/config.toml` to be created in your current working directory All service containers are started by default. You can exclude those not needed by passing in `-x` flag. +> A minimum of 7GB of RAM is required to start all services. + Health checks are automatically added to verify the started containers. Use `--ignore-health-check` flag to ignore these errors. From 48b7aecf1b21dc51ec21b3f27da2f549a08df038 Mon Sep 17 00:00:00 2001 From: Qiao Han Date: Wed, 25 Jan 2023 12:32:36 +0800 Subject: [PATCH 2/3] chore: document stop command --- docs/supabase/stop.md | 7 +++++++ docs/templates/examples.yaml | 3 ++- internal/stop/stop.go | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 docs/supabase/stop.md diff --git a/docs/supabase/stop.md b/docs/supabase/stop.md new file mode 100644 index 0000000000..ead3688c7c --- /dev/null +++ b/docs/supabase/stop.md @@ -0,0 +1,7 @@ +## supabase-stop + +Stops the Supabase local development stack. + +Requires `supabase/config.toml` to be created in your current working directory by running `supabase init`. + +All Docker resources are cleaned up by default. Use `--backup` flag to persist your local development data between restarts. diff --git a/docs/templates/examples.yaml b/docs/templates/examples.yaml index 8ab30ad1b9..574274d578 100644 --- a/docs/templates/examples.yaml +++ b/docs/templates/examples.yaml @@ -60,7 +60,8 @@ supabase-stop: name: Backup local database before stopping code: supabase stop --backup response: | - Database exported to supabase/.branches/main + Postgres database saved to volume: supabase_db_cli + Storage directory saved to volume: supabase_storage_cli Stopped supabase local development setup. supabase-status: - id: basic-usage diff --git a/internal/stop/stop.go b/internal/stop/stop.go index 80224836f8..b97c9c6958 100644 --- a/internal/stop/stop.go +++ b/internal/stop/stop.go @@ -50,7 +50,10 @@ func stop(ctx context.Context, backup bool) error { return err } // Remove named volumes - if !backup { + if backup { + fmt.Fprintln(os.Stderr, "Postgres database saved to volume:", utils.DbId) + fmt.Fprintln(os.Stderr, "Storage directory saved to volume:", utils.StorageId) + } else { // TODO: label named volumes to use VolumesPrune for branch support volumes := []string{utils.DbId, utils.StorageId} utils.WaitAll(volumes, func(name string) { From 23a0f4aa1f3974fc7ba59cd91ffa93af705332fb Mon Sep 17 00:00:00 2001 From: Qiao Han Date: Wed, 25 Jan 2023 13:35:51 +0800 Subject: [PATCH 3/3] chore: change RAM requirement to recommended --- docs/supabase/start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/supabase/start.md b/docs/supabase/start.md index 65316280ca..cef9cdad28 100644 --- a/docs/supabase/start.md +++ b/docs/supabase/start.md @@ -6,6 +6,6 @@ Requires `supabase/config.toml` to be created in your current working directory All service containers are started by default. You can exclude those not needed by passing in `-x` flag. -> A minimum of 7GB of RAM is required to start all services. +> It is recommended to have at least 7GB of RAM to start all services. Health checks are automatically added to verify the started containers. Use `--ignore-health-check` flag to ignore these errors.