From 9a715e9766aacf7ac89bf2449fc428f90f923195 Mon Sep 17 00:00:00 2001 From: Nicholas Koben Kao Date: Fri, 26 Jan 2024 19:34:07 -0800 Subject: [PATCH 1/3] preview toml file use with fly deploy -c --- builder/modal-builder/fly.preview.toml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 builder/modal-builder/fly.preview.toml diff --git a/builder/modal-builder/fly.preview.toml b/builder/modal-builder/fly.preview.toml new file mode 100644 index 0000000..0a26845 --- /dev/null +++ b/builder/modal-builder/fly.preview.toml @@ -0,0 +1,22 @@ +# fly.toml app configuration file generated for modal-builder-preview on 2024-01-25T09:26:31Z +# +# See https://fly.io/docs/reference/configuration/ for information about how to use this file. +# + +app = 'modal-builder-preview' +primary_region = 'sea' + +[build] + +[http_service] + internal_port = 8080 + force_https = true + auto_stop_machines = true + auto_start_machines = true + min_machines_running = 0 + processes = ['app'] + +[[vm]] + cpu_kind = 'shared' + cpus = 1 + memory_mb = 1024 From dd0af2a3e997571d349e8e2141d856b75f13d035 Mon Sep 17 00:00:00 2001 From: Nicholas Koben Kao Date: Fri, 26 Jan 2024 19:35:00 -0800 Subject: [PATCH 2/3] note about the 2 toml files --- builder/modal-builder/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builder/modal-builder/README.md b/builder/modal-builder/README.md index c68c46e..24f7e6f 100644 --- a/builder/modal-builder/README.md +++ b/builder/modal-builder/README.md @@ -16,6 +16,7 @@ docker build -t bennykok/comfydeploy-builder:dev . && docker run --env-file .env ``` ## Before Deploy to Fly.io +there are 2 `toml` files one is for `preview` and the other is for `prod` ## Fly.io installation ### Mac/Liunx @@ -54,4 +55,4 @@ fly launch if not, run this instead ``` fly deploy -``` \ No newline at end of file +``` From 2a55b20887969c598bed71f3a0858536acb5eb3a Mon Sep 17 00:00:00 2001 From: Nicholas Koben Kao Date: Fri, 26 Jan 2024 19:37:21 -0800 Subject: [PATCH 3/3] add a note and change so that by default it uses preview toml file --- builder/modal-builder/README.md | 4 +++- .../{fly.preview.toml => fly.production.toml} | 13 ++++--------- builder/modal-builder/fly.toml | 13 +++++++++---- 3 files changed, 16 insertions(+), 14 deletions(-) rename builder/modal-builder/{fly.preview.toml => fly.production.toml} (52%) diff --git a/builder/modal-builder/README.md b/builder/modal-builder/README.md index 24f7e6f..a8bd3a2 100644 --- a/builder/modal-builder/README.md +++ b/builder/modal-builder/README.md @@ -16,7 +16,6 @@ docker build -t bennykok/comfydeploy-builder:dev . && docker run --env-file .env ``` ## Before Deploy to Fly.io -there are 2 `toml` files one is for `preview` and the other is for `prod` ## Fly.io installation ### Mac/Liunx @@ -43,6 +42,9 @@ fly secrets set MODAL_TOKEN_SECRET= ## To deploy +We have 2 `toml` files one for `production` and the other for `staging` +it will default to `staging` if you don't include the `-c` flag to choose your config file + ``` // model-builder/fly.toml app = diff --git a/builder/modal-builder/fly.preview.toml b/builder/modal-builder/fly.production.toml similarity index 52% rename from builder/modal-builder/fly.preview.toml rename to builder/modal-builder/fly.production.toml index 0a26845..e2b1daf 100644 --- a/builder/modal-builder/fly.preview.toml +++ b/builder/modal-builder/fly.production.toml @@ -1,10 +1,10 @@ -# fly.toml app configuration file generated for modal-builder-preview on 2024-01-25T09:26:31Z +# fly.toml app configuration file generated for modal-builder on 2024-01-03T22:29:34+08:00 # # See https://fly.io/docs/reference/configuration/ for information about how to use this file. # -app = 'modal-builder-preview' -primary_region = 'sea' +app = "modal-builder" +primary_region = "sea" [build] @@ -14,9 +14,4 @@ primary_region = 'sea' auto_stop_machines = true auto_start_machines = true min_machines_running = 0 - processes = ['app'] - -[[vm]] - cpu_kind = 'shared' - cpus = 1 - memory_mb = 1024 + processes = ["app"] diff --git a/builder/modal-builder/fly.toml b/builder/modal-builder/fly.toml index e2b1daf..0a26845 100644 --- a/builder/modal-builder/fly.toml +++ b/builder/modal-builder/fly.toml @@ -1,10 +1,10 @@ -# fly.toml app configuration file generated for modal-builder on 2024-01-03T22:29:34+08:00 +# fly.toml app configuration file generated for modal-builder-preview on 2024-01-25T09:26:31Z # # See https://fly.io/docs/reference/configuration/ for information about how to use this file. # -app = "modal-builder" -primary_region = "sea" +app = 'modal-builder-preview' +primary_region = 'sea' [build] @@ -14,4 +14,9 @@ primary_region = "sea" auto_stop_machines = true auto_start_machines = true min_machines_running = 0 - processes = ["app"] + processes = ['app'] + +[[vm]] + cpu_kind = 'shared' + cpus = 1 + memory_mb = 1024