Skip to content

Commit

Permalink
auto extend volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Dec 12, 2024
1 parent 3b2b772 commit d3d063a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
9 changes: 8 additions & 1 deletion lib/generators/dockerfile_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 5 additions & 2 deletions test/results/no_prep/fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

7 changes: 5 additions & 2 deletions test/results/solid_queue_sqlite3/fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

7 changes: 5 additions & 2 deletions test/results/sqlite3/fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit d3d063a

Please sign in to comment.