Deploy Ruby on Rails to AWS in 5 minutes.
Push a Rails (or Sinatra / Hanami) repo to Lander. Bundler-aware Dockerfile, per-customer Fargate, RDS Postgres. Same git push, real AWS underneath.[walkthrough · 5 minutes]
01
Rails 7+ ships a working Dockerfile via `rails new` (or `bin/rails generate dockerfile`). For older apps, this template works.Add a Dockerfile
# Dockerfile
FROM ruby:3.3-slim
WORKDIR /app
RUN apt-get update -qq && apt-get install -y --no-install-recommends \
build-essential libpq-dev libyaml-dev curl && \
rm -rf /var/lib/apt/lists/*
COPY Gemfile Gemfile.lock ./
RUN bundle config set --local without 'development test' && \
bundle install --jobs 4
COPY . .
RUN bundle exec rails assets:precompile
ENV RAILS_ENV=production
ENV PORT=80
EXPOSE 80
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0", "-p", "80"]02
Rails decrypts credentials.yml.enc using config/master.key. Don't commit master.key — paste its contents into Lander's env-var panel as RAILS_MASTER_KEY before first deploy.Set RAILS_MASTER_KEY in env vars
03
Set LANDER_NEEDS_DB=1 in env vars; Lander spins up RDS Postgres and exposes DATABASE_URL. Run migrations on first deploy with a release-phase command in your Dockerfile.Provision Postgres
04
Hobby plan ($25/mo) for 1 dynamic Rails app. Add custom domain on Hobby+ via CNAME.Push to deploy
[why · lander vs vercel · railway · render]
- →Per-customer Fargate keeps your Rails app isolated from noisy neighbors during peak traffic.
- →Built-in WAF blocks Brakeman-flagged exploits at the edge before Rails sees the request.
- →RDS Postgres provisioned by env-var flag — no separate database setup ceremony.
[gotchas]
- ·Asset precompilation needs SECRET_KEY_BASE — use `SECRET_KEY_BASE=DUMMY rails assets:precompile` in the Dockerfile if env not set at build time.
- ·Action Cable / Solid Queue need a separate worker container or Redis. Lander supports a sidecar worker pattern; ask in #ops if your setup is non-trivial.
- ·Active Storage with S3: Lander provisions the bucket if you set ACTIVE_STORAGE_S3=1 — otherwise wire it manually with AWS keys.
[other stacks · same flow]