Ruby on RailsRuby

Deploy a Ruby on Rails app

Run a Rails 8 app from the Dockerfile Rails generates, with managed Postgres, Solid Queue jobs and graceful Puma restarts, on a managed AWS cloud in 17 regions.

Last updated /Tested with Rails 8.1.4.1, Ruby 4.0.10, Puma 8.1.3, Thruster 0.1.28, Solid Queue 1.7.2 and PostgreSQL 19.0

To deploy a Rails app, build the production Dockerfile that rails new generates, give the container a RAILS_MASTER_KEY or SECRET_KEY_BASE and a DATABASE_URL, and run it on a platform that keeps Puma up behind HTTPS and runs your migrations once per release. Modelence is a managed cloud on AWS that builds that image, runs it as containers in one of 17 regions with managed MongoDB, Postgres and Redis next to it, and deploys it with one command.

Ruby on Rails 8 already ships most of a production setup: a multi-stage Dockerfile, the Thruster proxy in front of Puma, and Solid Queue, Solid Cache and Solid Cable, which keep background jobs, the cache and Action Cable messages in your database so you don't need Redis to start. It also generates a Kamal config for deploying to your own servers, which you won't need here. This guide creates a Rails app on Postgres, puts the Solid tables in one database, makes two small changes to the Dockerfile, writes modelence.config.json and deploys it. If you already have a Rails 7.1 or newer app with the generated Dockerfile, skip to Run the app locally.

Ruby on Rails on Modelence at a glance

How Rails runs
Rails' generated Dockerfile builds the image, and Thruster and Puma serve it as a long-running container
Port
Thruster listens on HTTP_PORT (8080 in this guide, the port in ports) and runs Puma on 3000 behind it
Secrets
RAILS_MASTER_KEY or SECRET_KEY_BASE as an encrypted secret, viewable in the dashboard with every view logged
Databases
Managed MongoDB, Postgres and Redis in the app's region, with Postgres reaching Active Record as DATABASE_URL over TLS
Background jobs
Solid Queue inside Puma or bin/jobs as a second service, or Sidekiq with managed Redis
Shutdown
SIGTERM, then SIGKILL after 30 seconds by default (up to 120), so Puma and Solid Queue can stop cleanly
Price
Free plan to start. Paid plans from $20 a month with that $20 counted as usage, which Postgres and a jobs service need

Before you start

  • Ruby 3.2 or newer, which Rails 8.1 requires. This guide was tested on Ruby 4.0
  • PostgreSQL for local development, including its client library so the pg gem can compile
  • Docker, to build and run the production image on your machine before the first deploy
  • Node.js, only for the npx modelence command. A default Rails 8 app uses import maps and needs no Node.js to build or run
  • A Modelence account, which you can create for free. Managed Postgres and Redis, and a second service such as a job worker, need a paid plan
  • Optionally, Claude Code, Cursor or Codex, if you want your coding agent to adapt the Dockerfile and config and run the deploy

Create a Rails app

Install the Rails gem and generate an app that uses PostgreSQL. Besides the app itself, rails new writes a production Dockerfile, bin/docker-entrypoint, bin/thrust for Thruster, and config/deploy.yml plus .kamal/secrets for Kamal. A scaffold gives the app a page that reads and writes the database:

gem install rails
rails new my-app -d postgresql
cd my-app
bin/rails generate scaffold Post title:string body:text

Then point the home page at it in config/routes.rb. The generated routes already include /up, Rails' health check, which returns 200 once the app has booted.

config/routes.rb
Rails.application.routes.draw do
  resources :posts
  get "up" => "rails/health#show", as: :rails_health_check
  root "posts#index"
end

Keep Solid Queue, Cache and Cable in one database

The generated config/database.yml gives production four databases: the primary one plus cache, queue and cable for the three Solid gems, each with its own schema file. A managed Postgres arrives as a single DATABASE_URL, and when all four point at it, bin/rails db:prepare loads only the primary schema, because it sees the schema_migrations table and assumes the database is set up. The app then boots without the solid_queue_*, solid_cache_entries and solid_cable_messages tables, and the first job or cache write fails.

The simplest fix is one database for everything. Make the production entry in config/database.yml just the URL:

production:
  <<: *default
  url: <%= ENV["DATABASE_URL"] %>

Then remove the lines that send the Solid gems to their own databases: database: cache under production in config/cache.yml, the connects_to block under production in config/cable.yml, and config.solid_queue.connects_to in config/environments/production.rb. Finally, generate a migration with bin/rails generate migration CreateSolidTables and have it load the three schema files Rails generated, so the tables are created by the same migrations as the rest of your schema:

db/migrate/20261128030428_create_solid_tables.rb
class CreateSolidTables < ActiveRecord::Migration[8.1]
  def up
    load Rails.root.join("db/queue_schema.rb")
    load Rails.root.join("db/cache_schema.rb")
    load Rails.root.join("db/cable_schema.rb")
  end

  def down
    raise ActiveRecord::IrreversibleMigration
  end
end

Run the app locally

Create the development database, run the migrations and start the server:

bin/rails db:prepare
bin/dev

Open http://localhost:3000 to see the posts page and http://localhost:3000/up for the health check, which shows a green page. In development, jobs run in the Puma process and the cache lives in memory, so nothing else needs to be running.

Add a database

  • MongoDBMONGODB_URI
  • PostgresDATABASE_URL
  • RedisREDIS_URL

On Modelence, each managed database reaches Rails as a connection string in an environment variable, created in the app's region and reached over TLS, and production databases are backed up at least every 6 hours.

Postgres is the natural fit for Active Record. Bind its url output to DATABASE_URL, which the production entry in config/database.yml reads. The URL ends in ?sslmode=require, and Rails passes that parameter to the pg gem, so the connection uses TLS with no extra settings. Each Puma process opens up to RAILS_MAX_THREADS connections (3 by default), which is worth checking against the database plan before you add processes or containers.

Redis is optional on Rails 8, since the Solid gems use Postgres. Add it when you want Sidekiq, the Redis cache store or the Redis adapter for Action Cable, bind its URL to REDIS_URL and read it where you configure each one, for example config.cache_store = :redis_cache_store, { url: ENV["REDIS_URL"] }. The URL starts with rediss://, which the Redis client opens over TLS as it is.

For MongoDB, an app built on Mongoid declares "db": { "type": "mongodb" } under resources. Every service then gets MONGODB_URI without an env entry, and config/mongoid.yml reads it with uri: <%= ENV["MONGODB_URI"] %>.

A Postgres you already run on Supabase, Neon or elsewhere keeps working: declare DATABASE_URL in env with "type": "secret" and leave out the postgres resource.

Databases are resources in modelence.config.json, next to the Rails service, and a deploy creates any that don't exist yet before the new version starts. With Redis added, the file looks like this:

modelence.config.json
{
  "resources": {
    // "web": the Rails service from the deploy steps below
    "main-db": { "type": "postgres", "plan": "postgres-1gb" },
    "cache": { "type": "redis" }
  },
  "env": {
    "DATABASE_URL": { "type": "resource", "resource": "main-db", "output": "url" },
    "REDIS_URL": { "type": "resource", "resource": "cache", "output": "url" },
    "RAILS_MASTER_KEY": { "type": "secret" }
  }
}

Adjust the Dockerfile Rails generated

Rails' Dockerfile already does what a production image needs. It installs gems in a separate build stage, precompiles bootsnap and runs assets:precompile with SECRET_KEY_BASE_DUMMY=1, so the build needs no secrets and the image ships finished assets. It runs as a non-root user and preloads jemalloc to keep memory down. Keep all of that and change two things:

  1. Pull the Ruby image from public.ecr.aws/docker/library/ instead of Docker Hub, which limits how often images can be pulled. Keep RUBY_VERSION in step with .ruby-version.
  2. Replace EXPOSE 80 with ENV HTTP_PORT="8080" and EXPOSE 8080. Thruster listens on port 80 unless HTTP_PORT says otherwise, and the port it listens on is the one you declare in modelence.config.json.

Thruster and Puma run together in one container. Thruster takes the requests on 8080, compresses responses, serves the precompiled assets with long cache headers and handles X-Sendfile, then hands everything else to Puma, which it starts on port 3000 inside the container. Leave Thruster's TLS_DOMAIN unset, because HTTPS is handled before traffic reaches the container. If you'd rather run Puma alone, change CMD to ["./bin/rails", "server"] and it binds to PORT, which Modelence sets to the first port in ports.

Kamal's files are for deploying to servers you run yourself over SSH, with kamal-proxy routing traffic. Modelence builds the image and routes traffic itself, so config/deploy.yml, .kamal/ and bin/kamal go unused, and .dockerignore already keeps them out of the image. Two settings in config/deploy.yml are worth carrying over: SOLID_QUEUE_IN_PUMA moves to env in modelence.config.json, and the volume for Active Storage becomes an object store, as the checklist below explains.

Dockerfile
# syntax=docker/dockerfile:1
# check=error=true

# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
ARG RUBY_VERSION=4.0.10
FROM public.ecr.aws/docker/library/ruby:$RUBY_VERSION-slim AS base

# Rails app lives here
WORKDIR /rails

# Install base packages
RUN apt-get update -qq && \
    apt-get install --no-install-recommends -y curl libjemalloc2 libvips postgresql-client && \
    ln -s /usr/lib/$(uname -m)-linux-gnu/libjemalloc.so.2 /usr/local/lib/libjemalloc.so && \
    rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Set production environment variables and enable jemalloc for reduced memory usage and latency.
ENV RAILS_ENV="production" \
    BUNDLE_DEPLOYMENT="1" \
    BUNDLE_PATH="/usr/local/bundle" \
    BUNDLE_WITHOUT="development" \
    LD_PRELOAD="/usr/local/lib/libjemalloc.so"

# Throw-away build stage to reduce size of final image
FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
    apt-get install --no-install-recommends -y build-essential git libpq-dev libvips libyaml-dev pkg-config && \
    rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
COPY vendor/* ./vendor/
COPY Gemfile Gemfile.lock ./

RUN bundle install && \
    rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
    # -j 1 disable parallel compilation to avoid a QEMU bug: https://github.com/rails/bootsnap/issues/495
    bundle exec bootsnap precompile -j 1 --gemfile

# Copy application code
COPY . .

# Precompile bootsnap code for faster boot times.
# -j 1 disable parallel compilation to avoid a QEMU bug: https://github.com/rails/bootsnap/issues/495
RUN bundle exec bootsnap precompile -j 1 app/ lib/

# Precompiling assets for production without requiring secret RAILS_MASTER_KEY
RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile

# Final stage for app image
FROM base

# Run and own only the runtime files as a non-root user for security
RUN groupadd --system --gid 1000 rails && \
    useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash
USER 1000:1000

# Copy built artifacts: gems, application
COPY --chown=rails:rails --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}"
COPY --chown=rails:rails --from=build /rails /rails

# Entrypoint prepares the database.
ENTRYPOINT ["/rails/bin/docker-entrypoint"]

# Start server via Thruster by default, this can be overwritten at runtime
ENV HTTP_PORT="8080"
EXPOSE 8080
CMD ["./bin/thrust", "./bin/rails", "server"]

Give Puma time to finish requests on SIGTERM

When Modelence stops a container during a deploy, it sends SIGTERM and, after stopTimeout seconds (30 by default), SIGKILL. Requests can still reach the container for about 10 seconds after SIGTERM. Thruster passes the signal straight to Puma, and Puma finishes the requests in flight and exits within a fraction of a second, so requests that arrive after that are refused.

The last line of Rails' bin/docker-entrypoint is exec "${@}". Replace it with the lines below, which keep Thruster and Puma serving for 10 seconds after SIGTERM and then pass the signal on. Puma then logs Gracefully stopping, waiting for requests to finish and exits, well inside the default stopTimeout.

bin/docker-entrypoint
#!/bin/bash -e

# If running the rails server then create or migrate existing database
if [ "${@: -2:1}" == "./bin/rails" ] && [ "${@: -1:1}" == "server" ]; then
  ./bin/rails db:prepare
fi

# Requests can still arrive for about 10 seconds after SIGTERM, so pass
# the signal on to Thruster and Puma only after that.
"${@}" &
pid=$!
trap 'sleep 10; kill -TERM "$pid"' TERM
wait "$pid" || wait "$pid"

Describe the app in modelence.config.json

Add modelence.config.json to the project root. It declares the Rails service, built from the Dockerfile, with Thruster's port and an HTTP health check on /up, and a managed Postgres whose URL becomes DATABASE_URL. RAILS_MASTER_KEY is a secret, so the first deploy asks for it; paste the contents of config/master.key. Secrets are encrypted, and they stay viewable in the dashboard with every view logged.

If you keep nothing in config/credentials.yml.enc, set a SECRET_KEY_BASE secret instead, generated with bin/rails secret. Rails reads SECRET_KEY_BASE from the environment before it looks in credentials, and without either one the app stops at boot with Missing secret_key_base for 'production' environment.

SOLID_QUEUE_IN_PUMA runs the Solid Queue supervisor inside Puma, so jobs run in the web container. When jobs need their own CPU, remove that variable and add a second service from the same image that runs bin/jobs:

"jobs": {
  "type": "service",
  "dockerfile": "Dockerfile",
  "start": { "commands": ["exec ./bin/jobs"] },
  "healthCheck": { "type": "none" }
}

start replaces the image's entrypoint and CMD, so the worker skips db:prepare and starts straight away. For Sidekiq, add a redis resource bound to REDIS_URL, as in the database section above, and start the worker with exec bundle exec sidekiq. dev is only for npx modelence@latest dev, which runs bin/dev on your machine; deploys never use it.

modelence.config.json
{
  "$schema": "https://cloud.modelence.com/schema/modelence.config.json?version=1",
  "resources": {
    "web": {
      "type": "service",
      "dockerfile": "Dockerfile",
      "ports": [8080],
      "healthCheck": { "type": "http", "path": "/up" },
      "dev": { "commands": ["bin/dev"] }
    },
    "main-db": { "type": "postgres", "plan": "postgres-1gb" }
  },
  "env": {
    "DATABASE_URL": { "type": "resource", "resource": "main-db", "output": "url" },
    "RAILS_MASTER_KEY": { "type": "secret" },
    "SOLID_QUEUE_IN_PUMA": { "value": "true" }
  }
}

Check the build locally

Build the image and run it against a Postgres the container can reach, with the same variables the deploy will pass, then open http://localhost:8080/up. On Linux, add --add-host=host.docker.internal:host-gateway so the container can reach a database on your machine. A deploy runs the same build, so a failure here would fail there too.

bash
docker build -t my-app .
docker run --rm -p 8080:8080 \
  -e RAILS_MASTER_KEY="$(cat config/master.key)" \
  -e DATABASE_URL=postgresql://postgres:[email protected]/my_app_production \
  -e SITE_URL=http://localhost:8080 \
  my-app

Deploy

From the project directory, run:

npx modelence@latest deploy

The command opens a browser window to sign in. There you choose or create the organization, app and environment, and paste RAILS_MASTER_KEY when it's asked for. It then uploads the project, builds the image from the Dockerfile and streams the build until the new version is live. The first deploy of an environment asks for its AWS region, where the containers and the database are created; later runs can pass --app <app> --env <env> to skip the prompts.

On the first deploy, Modelence creates the Postgres database before it starts the app. The entrypoint's db:prepare then loads the schema, including the Solid tables, and the environment's URL, <app>-<environment>.cloud.modelence.app, points at port 8080 of the web service. Add your own domain under Domains in the dashboard. Each app has a sandbox and a production environment, and both deploy from the same files.

Let your coding agent do it

In your Rails project, give Claude Code, Cursor or Codex the prompt Deploy using https://modelence.com/skill.md. The agent reads the docs, adapts the Dockerfile and writes modelence.config.json, checks the build and runs the deploy, and it asks you whenever a step needs your account.

Production readiness

Trust the HTTPS in front of the container

Puma only ever sees plain HTTP, both from the public URL and from other services on the environment's private network. Set config.assume_ssl = true and config.force_ssl = true in config/environments/production.rb. With assume_ssl, Rails treats every request as HTTPS, so force_ssl adds the HSTS header and secure cookies without redirecting private calls into a loop, and URL helpers build https:// links.

Allow your hosts and keep /up open

Rails answers 403 for any Host that config.hosts doesn't list, once you list at least one. Modelence sets SITE_URL to the environment's URL, so add its host along with your own domains, and exclude the health check so it works whatever host it's sent with:

config.hosts << URI(ENV["SITE_URL"]).host if ENV["SITE_URL"]
config.hosts << "www.example.com"
config.host_authorization = { exclude: ->(request) { request.path == "/up" } }

Check health on /up, not the port

Thruster accepts connections before Puma has booted and answers 502 until it has, so the default TCP check would pass too early. An HTTP check on /up passes only once Rails can serve a request. Failing checks don't count for healthCheck.gracePeriod seconds after a container starts (60 by default, up to 300), which covers the entrypoint's db:prepare and the boot. Rails 8 already keeps /up out of the logs with config.silence_healthcheck_path.

Run migrations once per deploy

Modelence has no release step, so the generated entrypoint's db:prepare runs in every Rails container before Puma starts. With one container that works well: the first deploy loads the schema and later deploys apply new migrations. When several containers start at once, they all try to migrate. Rails holds a Postgres advisory lock while it migrates, so one container wins and the others exit with ActiveRecord::ConcurrentMigrationError and have to start again. Once you run more than one container, or a migration takes long, delete the db:prepare lines from bin/docker-entrypoint and run RAILS_ENV=production bin/rails db:migrate against the environment's database before you deploy. Either way, the old version keeps serving until the new one is healthy, so write migrations the running code can live with, such as adding a column before the code that uses it.

Store uploads in an object store

Containers have no persistent disk, so files written inside one disappear on the next deploy or restart. The generated config.active_storage.service = :local writes uploads to storage/ in the container, which Kamal covers with a volume. On Modelence, uncomment the amazon service in config/storage.yml, add the aws-sdk-s3 gem, switch production to :amazon and keep the bucket keys in credentials or as secrets. The same applies to SQLite: keep production data in Postgres.

Pick where background jobs run

Solid Queue inside Puma suits an app with light job traffic. A separate jobs service runs bin/jobs with its own CPU and memory, and both versions can run side by side during a deploy, since Solid Queue workers claim jobs from the database. On SIGTERM, Solid Queue gives running jobs 5 seconds by default (shutdown_timeout) and puts unfinished ones back in the queue. Sidekiq waits 25 seconds by default before it pushes unfinished jobs back to Redis, which fits inside the default stopTimeout of 30.

Size Puma for the container

Rails' config/puma.rb runs one Puma process with RAILS_MAX_THREADS threads, 3 by default. On a container with more than one vCPU, set WEB_CONCURRENCY in env to run that many processes, and keep RAILS_MAX_THREADS times the number of processes and containers within what the database plan accepts.

Read the logs

Production Rails logs to standard output with a request ID on each line, and whatever the container prints shows on the Logs page in the dashboard with nothing to set up.

Modelence vs Heroku, Render and Fly.io for Rails

Rails developers mostly weigh Heroku, where many Rails apps started, against Render and Fly.io, and the main differences are how the app is built, where migrations run and how the bill adds up. The details below come from each platform's own docs and pricing pages as of November 2026.

PlatformHow a Rails app runsMigrationsPricing
ModelenceRails' own Dockerfile, with Thruster and Puma in long-running containers on AWS, in 17 regions across two availability zonesdb:prepare in the entrypoint with one container, or bin/rails db:migrate run before the deployFree plan; paid plans from $20 a month with $20 of usage included. Managed MongoDB, Postgres and Redis in the app's region
HerokuThe Ruby buildpack runs Puma from a Procfile on dynos, in 2 Common Runtime regions (US and Europe) or 10 more with Private Spaces; requests time out after 30 secondsA release command in the Procfile runs once per release, before new dynos startEco dynos $5 a month (they sleep after 30 idle minutes), Basic $7, Standard from $25; Heroku Postgres from $5 a month
RenderNative Ruby runtime with a build script and bin/rails server, or a Dockerfile, in 5 regions (Oregon, Ohio, Virginia, Frankfurt and Singapore)A pre-deploy command such as bin/rails db:migrate, on paid instancesWorkspace plan (Hobby free, Pro $25 a month) plus instances from $7 a month and Postgres from $6. Free web services spin down after 15 idle minutes
Fly.iofly launch writes a Dockerfile for the app and runs it on Fly Machines, in 17 regions on six continentsrelease_command runs once per deploy in a temporary MachineBilled by the second, from $2.19 a month for a 256 MB shared-cpu-1x Machine; Managed Postgres from $4 a month

Heroku is a good fit for a team that wants git push deploys without maintaining a Dockerfile, and its release phase runs migrations once before new dynos take traffic. Render gives you the same native Ruby setup with a fixed price per instance, and Fly.io generates a Rails Dockerfile for you and runs Machines close to users on six continents, which suits apps with users spread around the world. Modelence fits a Rails 8 app that already has its generated Dockerfile and wants managed MongoDB, Postgres and Redis next to it in the same region, with usage included in the plan price instead of a separate charge for each add-on. For more detail, see Heroku alternatives, Render alternatives and Fly.io alternatives.

Next steps

Frequently asked questions

How do I deploy a Ruby on Rails app to production?

Build the production Dockerfile that Rails 7.1 and newer generate, give the container RAILS_MASTER_KEY (or SECRET_KEY_BASE) and DATABASE_URL, and run it on a platform that keeps Puma running behind HTTPS. On Modelence you add a modelence.config.json that declares the Dockerfile service and a managed Postgres, then run npx modelence@latest deploy. Assets are precompiled during the image build, and the generated entrypoint runs db:prepare before the server starts.

Do I need Kamal to deploy a Rails 8 app?

No, Kamal is only needed when you deploy to servers you manage yourself. It builds the image, pushes it to a registry and runs it on your hosts over SSH, with kamal-proxy in front. A platform that builds the Dockerfile and routes traffic for you, such as Modelence, Render or Fly.io, uses the same Dockerfile without Kamal, so config/deploy.yml and .kamal/ can stay unused or be deleted.

Should Thruster or Puma listen on the container's port?

Thruster should, with Puma behind it on an internal port. Rails 8's Dockerfile starts ./bin/thrust ./bin/rails server, so Thruster listens on HTTP_PORT (80 unless you change it) and starts Puma on port 3000, adding compression and cached asset serving. On Modelence, set HTTP_PORT to the port in ports, such as 8080. To run Puma alone, start ./bin/rails server and it binds to the PORT variable instead.

Should I use RAILS_MASTER_KEY or SECRET_KEY_BASE in production?

Use RAILS_MASTER_KEY if the app keeps anything in encrypted credentials, and SECRET_KEY_BASE if it doesn't. The master key decrypts config/credentials.yml.enc, which also holds a secret_key_base, while SECRET_KEY_BASE from the environment takes precedence over credentials and is enough for sessions and signed cookies on its own. Store either as a secret, never in the image, and note that the Dockerfile's asset build uses SECRET_KEY_BASE_DUMMY so it needs neither.

Why does Rails show Blocked hosts or a redirect loop behind a load balancer?

Blocked hosts means the request's Host isn't in config.hosts, and a redirect loop means force_ssl thinks the request arrived over plain HTTP. Add your app's domains to config.hosts and exclude /up with config.host_authorization, then set config.assume_ssl = true so Rails trusts the HTTPS in front of it. Both settings live in config/environments/production.rb.

Where should Rails migrations run when I deploy?

Migrations should run once per deploy, before the new code takes traffic. Rails' generated bin/docker-entrypoint runs bin/rails db:prepare in every web container, which is fine with one container, but several containers then race for the migration lock and the losers exit with ActiveRecord::ConcurrentMigrationError. Heroku, Render and Fly.io offer a release or pre-deploy command for this; on Modelence, run bin/rails db:migrate against the environment's database before you deploy once you have more than one container.

Can Solid Queue, Solid Cache and Solid Cable share one Postgres database?

Yes, all three can use the app's main database. Point the production entry in config/database.yml at DATABASE_URL, remove the cache, queue and cable database settings from cache.yml, cable.yml and production.rb, and add a migration that loads db/queue_schema.rb, db/cache_schema.rb and db/cable_schema.rb. Without that migration, db:prepare on a shared database creates only the primary schema.

Do I need Redis to run a Rails 8 app?

No, a default Rails 8 app runs jobs, caching and Action Cable on its database through Solid Queue, Solid Cache and Solid Cable. Redis becomes necessary when you choose Sidekiq, the Redis cache store or the Redis Action Cable adapter. On Modelence you add it as a redis resource and read the rediss:// connection string from REDIS_URL.

How do I move a Rails app from Heroku?

Replace the buildpack with Rails' generated Dockerfile, then carry over the Procfile, add-ons and config vars. The web process becomes the Dockerfile's CMD, a worker process becomes a second service with its own start command, and Heroku Postgres and Redis become managed resources whose URLs arrive as DATABASE_URL and REDIS_URL. Config vars become env entries or secrets, and the migrations from the release command run before each deploy.

Where do Active Storage uploads go in a container?

Uploads should go to an object store such as Amazon S3, because a container's disk is wiped on every deploy. Rails' default production setting writes to storage/ on local disk, which only survives when a volume is mounted there. Configure the amazon service in config/storage.yml, add the aws-sdk-s3 gem and set config.active_storage.service = :amazon.

Deploy other stacks

Deploy your Ruby on Rails app

Start on the free plan and move up when your app needs more.

Or paste this into your coding agent