Repository navigation
Add a complete Laravel fly.toml with web, scheduler, queue worker, Postgres and Redis - #2678
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. |
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
The Laravel cron and queues page shows
[processes]in fragments, so agents have to assemble the web, scheduler and worker groups, the service and the database settings themselves. This adds a "Complete fly.toml" section with one full file:app(web, empty command so the image's entrypoint starts Nginx/PHP-FPM),cron(cron -f),worker(php artisan queue:listen),[http_service]bound toapp, a release command for migrations, andDB_CONNECTION/QUEUE_CONNECTIONenv.Managed Postgres and Redis aren't fly.toml keys, so the commands sit next to the file:
fly mpg create,fly mpg attach --variable-name DB_URL,fly redis create,fly secrets set REDIS_URL=.... Modelled on #2666.Checked against source:
internal/appconfig(config.go,service.go).fly config validate --strictpasses on the exact block from the page, and rejects an unknown key, so the check is real.appcommand:InitCmdandvalidateProcessesSectionininternal/appconfigallow it. The dockerfile-laravel entrypoint runs supervisord when no command is passed. Its Dockerfile installscronand writes/etc/cron.d/laravelwithschedule:run, andEXPOSE 8080.[env]values and build args are the ones flyctl's Laravel scanner generates (scanner/laravel.go). The release command matcheslaravel-db-migrations.mdx.DB_URL,REDIS_URL,QUEUE_CONNECTIONandDB_CONNECTIONare the names in laravel/laravel'sconfig/database.phpandconfig/queue.php. The PHP package list includesphp8.3-redisandphp8.3-pgsql.fly mpg attachtakes--variable-name(defaultDATABASE_URL). flyctl has nofly redis attachsubcommand, hencefly secrets set.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. A separate PR adds a link near the top of this page; the hunks don't overlap and the two branches merge cleanly.