Framework guides
Rails
Deploy Rails with PostgreSQL, then add background jobs, object storage and caching.
Sinatra
Deploy a Sinatra application with Puma and
config.ru.How Ruby applications run on Sevalla
Every process (web, worker, cron job and job) runs from the same image, each with its own start command. See Processes for every process type and its settings.
Ingot stops the build with a message in the build log when Bundler can’t install the gems as committed:
Pin the Ruby version
Ingot builds on Ruby 4.0, its default line, unless the project sets a version. Pin the line you develop with in theGemfile, under the source line, so the build doesn’t change when a new Ingot release moves its default line:
Gemfile
bundle install to record it in Gemfile.lock. ~> 4.0.0 allows any 4.0 release: Ingot builds on the 4.0 line’s image, which moves to each new patch release, and Bundler refuses to run the application on another line.
Ingot takes the version from the first of these that’s set:
- The
INGOT_RUBY_VERSIONenvironment variable, orversions.rubyiningot.json. - The
rubyline of theGemfile, or the file it names withruby file: ".ruby-version". RUBY VERSIONinGemfile.lock, which records the version when therubyline computes it, asruby File.read(".ruby-version")does..ruby-version, then.tool-versionsor mise’s configuration.
ruby-4.0.9 that rails new writes to .ruby-version, builds on that release only, without later security fixes; with the ruby line in the Gemfile, Ingot doesn’t read .ruby-version. Ingot builds with the standard Ruby interpreter: a Gemfile that names another engine, such as JRuby, fails the build. See Set the language version.
Build with a Dockerfile
Ingot needs no Dockerfile. When you want full control of the image, a Dockerfile for a Ruby application builds the gems in one stage, fromGemfile.lock with BUNDLE_DEPLOYMENT set, and copies them with the code into a final stage on ruby:4.0-slim-trixie, the Ruby line the Gemfile pins. The final stage keeps the code owned by root, runs as a non-root user with UID 1000, and starts Puma in exec form so it receives SIGTERM and finishes its requests, listening on PORT (8080 by default). Rails generates a Dockerfile with rails new: see Deploy a Rails application for what to change for Sevalla, and Deploy a Sinatra application for a Rack application.