Framework Frankfurt, Germany
Deploy Ruby on Rails on Nodion
Rails 7.1 and later generate a Dockerfile, and Nodion builds your app with it: Ruby, gems, JavaScript bundling and assets:precompile run the way Rails set them up. Apps with importmap and no package.json can use the Ruby buildpack instead, which precompiles the assets and starts Puma. Either way the app and its PostgreSQL database run in Frankfurt.
- Build
- Generated Dockerfile (Rails 7.1+) or buildpacks
- Start
- The Dockerfile's command, or Puma with
config/puma.rb(buildpacks) - Health check
/up, built into Rails 7.1+- Region
- EU Central (Frankfurt)
Deploy Ruby on Rails step by step
- Build from the generated Dockerfile Create an application from your GitHub, GitLab, Bitbucket or Gitea repository in the region EU Central. Rails 7.1 and later ship a Dockerfile, so the form preselects the Dockerfile strategy. This is the path for apps with jsbundling, cssbundling or Vite: the JavaScript build runs in your Dockerfile, just as you set it up.
- Set the master key and the port Add
RAILS_MASTER_KEYwith the contents ofconfig/master.keyas a secret on the Environment tab. Nodion sets noPORTfor Dockerfile apps: the server listens on the web process port, which the form fills fromEXPOSE. Rails 7.1 and 7.2 expose 3000 for Puma. Rails 8 exposes 80 for Thruster, which runs in front of Puma; the image runs as a non-root user, so setHTTP_PORT=8080and make 8080 the web process port on the Processes tab. - Attach PostgreSQL Create a PostgreSQL database in the same region and attach it on the Environment tab; Rails uses the
DATABASE_URLit gets on the next deploy. The generatedbin/docker-entrypointrunsbin/rails db:preparebefore the Rails server starts, so pending migrations run when the new version boots. You can also set./bin/rails db:migrateas the app's release command (API fieldrelease_command, see the Docker guide), which runs once per deploy before the new version starts. - Use /up as the health check path Rails 7.1 and later answer
/upwith 200 once the app has booted; set it as the health check path in the app settings. Nodion calls each instance with its internal IP as Host, so if you setconfig.hosts, exclude/upfrom host authorization, or the release never goes live. config/environments/production.rbconfig.hosts << "www.example.com" config.host_authorization = { exclude: ->(request) { request.path == "/up" } } - Or use buildpacks for importmap apps An app with importmap and no
package.jsoncan choose Buildpacks in the create form instead. Nodion then runsbundle installwithout development and test gems andassets:precompilewithRAILS_ENV=productionandSECRET_KEY_BASE_DUMMY=1, starts Puma withconfig/puma.rbonPORTand setsRAILS_SERVE_STATIC_FILESandRAILS_LOG_TO_STDOUT. Migrations run from a Procfile: Procfilerelease: bin/rails db:migrate
Good to know
- Solid Queue and SidekiqWith buildpacks, add
worker: bin/jobs(Solid Queue) orworker: bundle exec sidekiqto the Procfile together with an explicitweb: bundle exec puma -C config/puma.rb; without aweb:line the first Procfile entry other thanrelease:becomes the default command. Then add a process namedworkerwithout a port on the Processes tab. With the Dockerfile, give that process the command./bin/jobsorbundle exec sidekiqinstead. Valkey in the same region gives Sidekiq itsREDIS_URL. - The extra databases of Rails 8A Rails 8 app generated for PostgreSQL also lists
cache,queueandcabledatabases for production inconfig/database.yml, andDATABASE_URLonly sets the primary one. Give the others a connection as well before the first deploy, or remove the ones your app does not use. - Ruby versionWith the Dockerfile, Ruby comes from
RUBY_VERSIONin the Dockerfile. With buildpacks, Nodion reads.ruby-versionor therubyline in the Gemfile and offers 3.3, 3.4 (default) and 4.0.
What Nodion runs for you
- Deploys without downtime Push to your branch and Nodion builds a new release. Traffic switches once the new instances answer their health check; a failed release leaves the running one in place. Apps with a local volume restart instead, because the disk belongs to one instance.
- Databases next to the app Managed PostgreSQL, pgvector, MySQL, Valkey and ClickHouse in the same region. Attached databases arrive as
DATABASE_URL,REDIS_URLorCLICKHOUSE_URL. - Previews per pull request Turn on previews and pull requests from your repository get their own app with its own URL and fresh, empty databases, created automatically or by hand. Forks and bot pull requests are skipped.
- Workers, cron jobs and scaling Run workers as extra processes of the same app, schedule jobs on the Cron tab, and scale every process to up to 16 instances.
- Release step With buildpacks, a Procfile
release:line runs with every new build. Dockerfile apps, and redeploys or rollbacks to an earlier image, use a release command set on the app itself, which also takes precedence over the Procfile line. On static sites a release step runs in an image that holds only the built files. - Logs and metrics Build, release and runtime logs plus CPU, memory, disk and network metrics for every instance in the dashboard.
- Domains and HTTPS A default hostname with HTTPS from the first deploy; your own domains get certificates automatically.
Further reading
- Heroku Alternatives with EU Hosting: 5 Options Compared A German platform and US clouds with EU regions, compared by headquarters, regions and managed databases.
- Dockerfile vs Buildpacks: Which One Should You Use? Both turn your code into a container image. What differs is who writes the build steps, and that decides control, maintenance and security updates.
Ruby on Rails on Nodion: questions and answers
Do I have to change the Dockerfile Rails generated?
Usually not. Set RAILS_MASTER_KEY as a secret, check the web process port (and HTTP_PORT on Rails 8) and use /up as the health check path.
Does Nodion run my Rails migrations?
With the generated Dockerfile, bin/docker-entrypoint runs db:prepare when the Rails server starts. With buildpacks, add release: bin/rails db:migrate to a Procfile; it runs once per build before the new version starts, and a failure stops the deploy.
Why does my Rails deploy never become ready?
Usually the health check gets a 404 on / because there is no root route, or a 403 from host authorization. Set /up as the health check path and exclude it from host authorization. On Rails 8 with the Dockerfile, also check that the web process port matches HTTP_PORT.
Can I use jsbundling or Vite?
Yes, with the Dockerfile: the JavaScript build runs in your Dockerfile, as in the one Rails generates for jsbundling and cssbundling. The buildpack path is for importmap apps without a package.json.
Where does my Ruby on Rails app run?
In the EU Central region in Frankfurt, Germany. Build, registry, the app and its databases, volumes, buckets, logs and metrics stay in that region, and Nodion's API and control plane are hosted in Germany. Nodion GmbH is based in Stuttgart.
Can I use Ruby on Rails in line with the GDPR?
Nodion provides the basis for it: Nodion GmbH is based in Stuttgart, Germany, in the Frankfurt region the app, its databases and volumes run in Germany, and you conclude the data processing agreement (DPA) under Art. 28 GDPR electronically in the dashboard. Whether your setup complies also depends on how you configure and use the app.
How much does it cost to run Ruby on Rails on Nodion?
An app instance starts at 1 EUR per month. The setup in the cost box costs 5.50 EUR per month: App 4 EUR, PostgreSQL 1.50 EUR. Prices are net and billed per second, and you pick bigger sizes or more instances whenever you need them.
Can I use my own domain for my Ruby on Rails app?
Yes. Every app gets a default hostname with HTTPS. Add your own domain on the app's Domains tab; the TLS certificate is issued and renewed automatically.