Ruby on Rails hosting
Run Rails with Puma, Sidekiq or Solid Queue, managed PostgreSQL and Redis. Deploys precompile assets, run migrations in a release phase and switch traffic without downtime, much like the Heroku workflow.
Build and run
- Detected by
- rails in Gemfile
- Build
- bundle install && bundle exec rails assets:precompile
- Start
- bundle exec puma -C config/puma.rb
FROM ruby:3.3-slim
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
WORKDIR /app
COPY Gemfile Gemfile.lock ./
RUN bundle install --without development test
COPY . .
RUN SECRET_KEY_BASE=dummy bundle exec rails assets:precompile
EXPOSE 3000
CMD ["bundle", "exec", "puma", "-C", "config/puma.rb"]Recommendations
- Set the release command to bundle exec rails db:migrate, the equivalent of Heroku's release phase.
- Run Sidekiq as a worker process against managed Redis. Solid Queue needs only PostgreSQL.
- Match Puma workers to the vCPUs allocated to the web process.
- Point Active Storage at any S3-compatible bucket.
Plans
| Plan | Price | vCPU | Memory | NVMe | Databases | Backups |
|---|---|---|---|---|---|---|
| Launch | $149/mo | 8 | 16 GB | 160 GB | 1 | Daily, kept 7 days |
| Grow | $249/mo | 12 | 32 GB | 320 GB | 2 | Daily, kept 14 days |
| Scale | $349/mo | 16 | 48 GB | 500 GB | 3, plus a read replica | Hourly and daily, kept 30 days |
| Custom | On request | As required | Up to a full server | As required | As required | As required |
Questions
How close is the workflow to Heroku?
Close. Git deploys, a release phase, process types, config variables, rollbacks and log tailing all work the same way. The main differences are dedicated hardware and a fixed monthly price.
Do we need a Dockerfile to deploy Rails?
No. 9live detects Rails and builds it with a maintained buildpack. If your repository has a Dockerfile, we use it instead.
How are environment variables managed?
Set them per environment in the dashboard or with the CLI. They are encrypted at rest and injected at runtime. Connection strings for managed databases are added automatically.
What happens when a deploy fails?
If the build fails, or the new release fails its health check, the current release keeps serving traffic. You get a notification with the build or health-check logs.
Talk to an engineer about your setup
Tell us what you run today and where it runs. We reply within one business day with a recommended plan and an estimate for the migration.
