Skip to content

Add a complete Rails fly.toml with Puma, Sidekiq, cron, Postgres and Redis - #2679

Open
alexleventer wants to merge 1 commit into
mainfrom
rails-fly-toml
Open

alexleventer wants to merge 1 commit into
mainfrom
rails-fly-toml

Conversation

@alexleventer

Copy link
Copy Markdown
Contributor

Claude (Claude Code) wrote this change from an agent-readiness review.

Summary of changes

Agents think running Puma and Sidekiq together on Fly.io needs a custom startup script. This opens the Sidekiq page with one complete fly.toml: app (./bin/rails server), worker (bundle exec sidekiq), cron (Supercronic), [http_service] bound to app, and release_command = "./bin/rails db:prepare". Managed Postgres and Redis aren't fly.toml keys, so the commands sit next to the file: fly mpg create, fly mpg attach (sets DATABASE_URL), fly redis create, fly secrets set REDIS_URL=.... Modelled on #2666.

Checked against source:

  • Every key is in flyctl's internal/appconfig. fly config validate --strict passes on the exact block from the page, and rejects an unknown key, so the check is real.
  • ./bin/rails server, bundle exec sidekiq and the ./bin/rails db:prepare release command are what dockerfile-rails writes (fly_processes, dbprep_command). Group names stay app/worker to match the rest of the page and its fly scale count app=3 worker=3.
  • The crontab path is /rails/crontab because the dockerfile-rails template uses WORKDIR /rails and COPY . .. The existing Supercronic blueprint example uses /app/crontab, which wouldn't match a Rails image. The page links that blueprint for the Dockerfile install step.
  • fly mpg attach defaults to DATABASE_URL. flyctl has no fly redis attach subcommand, hence fly secrets set.
  • internal_port = 3000 matches the rest of the page. A bullet says to set it to the port the app listens on (it differs with Thruster).

Preview

  • /rails/the-basics/sidekiq

Related Fly.io community and GitHub links

Notes

I validated the file but didn't deploy it, and there's no real command output in the section. Two other PRs touch this page (a fly redis create line, a link to the work queues page); the hunks don't overlap and all three branches merge cleanly together.

@mintlify

mintlify Bot commented Nov 22, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
fly-io 🟢 Ready View Preview Nov 22, 2026, 7:49 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@mintlify

mintlify Bot commented Nov 22, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
fly-io 🟡 Building – Nov 22, 2026, 7:49 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

This branch was successfully deployed

1 active deployment
staging — f2272884 Deployed Nov 22, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant