Repository navigation
Add a complete Rails fly.toml with Puma, Sidekiq, cron, Postgres and Redis - #2679
Open
alexleventer wants to merge 1 commit into
Open
alexleventer wants to merge 1 commit into
alexleventer wants to merge 1 commit into
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 toapp, andrelease_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(setsDATABASE_URL),fly redis create,fly secrets set REDIS_URL=.... Modelled on #2666.Checked against source:
internal/appconfig.fly config validate --strictpasses on the exact block from the page, and rejects an unknown key, so the check is real../bin/rails server,bundle exec sidekiqand the./bin/rails db:preparerelease command are what dockerfile-rails writes (fly_processes,dbprep_command). Group names stayapp/workerto match the rest of the page and itsfly scale count app=3 worker=3./rails/crontabbecause the dockerfile-rails template usesWORKDIR /railsandCOPY . .. 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 attachdefaults toDATABASE_URL. flyctl has nofly redis attachsubcommand, hencefly secrets set.internal_port = 3000matches the rest of the page. A bullet says to set it to the port the app listens on (it differs with Thruster).Preview
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 createline, a link to the work queues page); the hunks don't overlap and all three branches merge cleanly together.