From d3d063a36a8f740892f117c3492e839a8a3af7d9 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Thu, 12 Dec 2024 09:31:52 -0500 Subject: [PATCH] auto extend volumes --- lib/generators/dockerfile_generator.rb | 9 ++++++++- test/results/no_prep/fly.toml | 7 +++++-- test/results/solid_queue_sqlite3/fly.toml | 7 +++++-- test/results/sqlite3/fly.toml | 7 +++++-- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/lib/generators/dockerfile_generator.rb b/lib/generators/dockerfile_generator.rb index 1f02bb0..7ef76d7 100644 --- a/lib/generators/dockerfile_generator.rb +++ b/lib/generators/dockerfile_generator.rb @@ -1492,7 +1492,14 @@ def fly_make_toml if deploy_database == "sqlite3" if not toml.include? "[mounts]" - toml += "[mounts]\n source=\"data\"\n destination=\"/data\"\n\n" + toml += <<~EOF + "\n" + [mounts] + source = "data" + destination = "/data" + auto_extend_size_threshold = 80 + auto_extend_size_increment = "1GB" + auto_extend_size_limit = "10GB" + EOF end end diff --git a/test/results/no_prep/fly.toml b/test/results/no_prep/fly.toml index 8d44985..865620a 100644 --- a/test/results/no_prep/fly.toml +++ b/test/results/no_prep/fly.toml @@ -9,6 +9,9 @@ release_command = "./bin/rails db:prepare" [mounts] - source="data" - destination="/data" + source = "data" + destination = "/data" + auto_extend_size_threshold = 80 + auto_extend_size_increment = "1GB" + auto_extend_size_limit = "10GB" diff --git a/test/results/solid_queue_sqlite3/fly.toml b/test/results/solid_queue_sqlite3/fly.toml index f23425e..707bcdd 100644 --- a/test/results/solid_queue_sqlite3/fly.toml +++ b/test/results/solid_queue_sqlite3/fly.toml @@ -2,6 +2,9 @@ [env] PORT = "8080" [mounts] - source="data" - destination="/data" + source = "data" + destination = "/data" + auto_extend_size_threshold = 80 + auto_extend_size_increment = "1GB" + auto_extend_size_limit = "10GB" diff --git a/test/results/sqlite3/fly.toml b/test/results/sqlite3/fly.toml index fc497e6..07d4dff 100644 --- a/test/results/sqlite3/fly.toml +++ b/test/results/sqlite3/fly.toml @@ -6,6 +6,9 @@ app = "./bin/rails server" [mounts] - source="data" - destination="/data" + source = "data" + destination = "/data" + auto_extend_size_threshold = 80 + auto_extend_size_increment = "1GB" + auto_extend_size_limit = "10GB"