Skip to content

Add a complete Laravel fly.toml with web, scheduler, queue worker, Postgres and Redis - #2678

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

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

Conversation

@alexleventer

Copy link
Copy Markdown
Contributor

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 to app, a release command for migrations, and DB_CONNECTION/QUEUE_CONNECTION env.

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:

  • Every key is in flyctl's internal/appconfig (config.go, service.go). fly config validate --strict passes on the exact block from the page, and rejects an unknown key, so the check is real.
  • Empty app command: InitCmd and validateProcessesSection in internal/appconfig allow it. The dockerfile-laravel entrypoint runs supervisord when no command is passed. Its Dockerfile installs cron and writes /etc/cron.d/laravel with schedule:run, and EXPOSE 8080.
  • [env] values and build args are the ones flyctl's Laravel scanner generates (scanner/laravel.go). The release command matches laravel-db-migrations.mdx.
  • DB_URL, REDIS_URL, QUEUE_CONNECTION and DB_CONNECTION are the names in laravel/laravel's config/database.php and config/queue.php. The PHP package list includes php8.3-redis and php8.3-pgsql.
  • fly mpg attach takes --variable-name (default DATABASE_URL). flyctl has no fly redis attach subcommand, hence fly secrets set.

Preview

  • /laravel/the-basics/cron-and-queues

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.

@alexleventer
alexleventer requested a review from a team as a code owner November 22, 2026 19:49
@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.

This branch was successfully deployed

1 active deployment
staging — 958de9eb 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