Deploy Ruby on Rails in minutes

Modern Rails ships with a production Dockerfile out of the box. On Darmi Cloud you pick the Dockerfile preset and the platform builds and runs it behind automatic HTTPS. Below is a Dockerfile for older apps that don't have one yet.

Deploy from GitHub Automatic HTTPS subdomain Live build & runtime logs
Step by step

How to deploy Ruby on Rails

Darmi Cloud doesn't have a dedicated Ruby on Rails preset yet — but the Dockerfile preset gets you deployed just as fast.

  1. 1

    Add a Dockerfile to your repo

    Commit the Dockerfile below to the root of your Ruby on Rails repository. Darmi Cloud will build the image from it.

  2. 2

    Sign in with GitHub

    Open darmicloud.tech and sign in with GitHub (or Google). On first sign-in you grant read access so the deploy worker can clone your repositories.

  3. 3

    Import your repository

    Click New Project, pick your Ruby on Rails repository, and choose the branch to deploy — the default branch is preselected.

  4. 4

    Select the Dockerfile preset

    Choose the Dockerfile preset so Darmi Cloud builds and runs the image from your committed Dockerfile. Set the container port to 3000.

  5. 5

    Add environment variables

    Add any environment variables your app needs (database URLs, API keys, secrets). Mark sensitive values as secrets — they are injected into the container and hidden in the UI afterwards.

  6. 6

    Deploy and watch it go live

    Click Deploy. Watch the live build and runtime logs, and your app goes live on an automatic HTTPS subdomain. Every push to your branch redeploys automatically.

Dockerfile for Ruby on Rails

Copy this into a file named Dockerfile at the root of your repository.

# syntax=docker/dockerfile:1
FROM ruby:3.3-slim

RUN apt-get update -qq && apt-get install -y build-essential libpq-dev
WORKDIR /app
COPY Gemfile Gemfile.lock ./
RUN bundle install
COPY . .

ENV RAILS_ENV=production RAILS_SERVE_STATIC_FILES=true PORT=3000
RUN bundle exec rake assets:precompile
EXPOSE 3000
CMD ["sh", "-c", "bundle exec puma -b tcp://0.0.0.0:$PORT"]

Tips for Ruby on Rails on Darmi Cloud

  • Rails 7.1+ generates a production Dockerfile — if yours has one, just pick the Dockerfile preset and skip the sample above.
  • Set SECRET_KEY_BASE and your database URL in project settings.
  • Run rails db:migrate as part of your release step when the schema changes.
FAQ

Ruby on Rails deployment FAQ

Do I need to write a Dockerfile for Rails?

If you use Rails 7.1 or newer, it already ships a production Dockerfile — just pick the Dockerfile preset. For older apps, use the sample Dockerfile in this guide.

How are Rails assets handled?

Precompile them during the image build (rake assets:precompile) and set RAILS_SERVE_STATIC_FILES=true so Puma serves them, as shown above.

Can I use my own custom domain?

Yes. Connect an existing domain or buy one inside Darmi Cloud. DNS is configured automatically and every domain gets free SSL via Let's Encrypt.

Is there a free plan?

Yes. The Free plan deploys one project on an automatic HTTPS subdomain with auto-deploy on every push. Paid plans add custom domains, PR preview deployments and more projects.

Deploy other frameworks

Ready to deploy your Ruby on Rails app?

Connect GitHub and ship in minutes — on a free HTTPS subdomain, or on your own custom domain.

Deploy Ruby on Rails now