From bcb074248ad5d533fcd002fc57030293a827d598 Mon Sep 17 00:00:00 2001 From: "Fly.io" Date: Sun, 22 Feb 2026 14:56:16 +0000 Subject: [PATCH] New files from Fly.io Launch --- Gemfile | 2 ++ Gemfile.lock | 3 +++ config/database.yml | 4 ++++ config/dockerfile.yml | 6 ++++++ fly.toml | 38 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+) create mode 100644 config/dockerfile.yml create mode 100644 fly.toml diff --git a/Gemfile b/Gemfile index ed45b5b..87a1fc3 100644 --- a/Gemfile +++ b/Gemfile @@ -61,3 +61,5 @@ group :test do gem "capybara" gem "selenium-webdriver" end + +gem "dockerfile-rails", ">= 1.7", group: :development diff --git a/Gemfile.lock b/Gemfile.lock index da1f4a7..f50dfba 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -101,6 +101,8 @@ GEM debug (1.11.1) irb (~> 1.10) reline (>= 0.3.8) + dockerfile-rails (1.7.10) + rails (>= 3.0.0) dotenv (3.2.0) drb (2.2.3) ed25519 (1.4.0) @@ -368,6 +370,7 @@ DEPENDENCIES brakeman capybara debug + dockerfile-rails (>= 1.7) importmap-rails jbuilder kamal diff --git a/config/database.yml b/config/database.yml index 2640cb5..51a4359 100644 --- a/config/database.yml +++ b/config/database.yml @@ -27,15 +27,19 @@ production: primary: <<: *default database: storage/production.sqlite3 + url: <%= ENV["DATABASE_URL"] %> cache: <<: *default database: storage/production_cache.sqlite3 migrations_paths: db/cache_migrate + url: <%= URI.parse(ENV["DATABASE_URL"]).tap { |url| url.path += "_cache" } if ENV["DATABASE_URL"] %> queue: <<: *default database: storage/production_queue.sqlite3 migrations_paths: db/queue_migrate + url: <%= URI.parse(ENV["DATABASE_URL"]).tap { |url| url.path += "_queue" } if ENV["DATABASE_URL"] %> cable: <<: *default database: storage/production_cable.sqlite3 migrations_paths: db/cable_migrate + url: <%= URI.parse(ENV["DATABASE_URL"]).tap { |url| url.path += "_cable" } if ENV["DATABASE_URL"] %> diff --git a/config/dockerfile.yml b/config/dockerfile.yml new file mode 100644 index 0000000..223e505 --- /dev/null +++ b/config/dockerfile.yml @@ -0,0 +1,6 @@ +# generated by dockerfile-rails + +--- +options: + label: + fly_launch_runtime: rails diff --git a/fly.toml b/fly.toml new file mode 100644 index 0000000..310f710 --- /dev/null +++ b/fly.toml @@ -0,0 +1,38 @@ +# fly.toml app configuration file generated for utpin on 2026-02-22T14:56:12Z +# +# See https://fly.io/docs/reference/configuration/ for information about how to use this file. +# + +app = 'utpin' +primary_region = 'iad' +console_command = '/rails/bin/rails console' + +[build] + +[env] + DATABASE_URL = 'sqlite3:///data/production.sqlite3' + PORT = '8080' + +[processes] + app = './bin/rails server' + +[[mounts]] + source = 'data' + destination = '/data' + auto_extend_size_threshold = 80 + auto_extend_size_increment = '1GB' + auto_extend_size_limit = '10GB' + +[http_service] + internal_port = 8080 + force_https = true + auto_stop_machines = 'stop' + auto_start_machines = true + min_machines_running = 0 + processes = ['app'] + +[[vm]] + memory = '1gb' + cpu_kind = 'shared' + cpus = 1 + memory_mb = 1024