Migrations Migrating from Heroku, Render, Hatchbox or Cloud 66? We move your production app within 48 hours →
Laravel

Laravel

Deploy Laravel with MySQL or Postgres, APP_KEY, queue workers, Horizon and the scheduler.

  • Release: php artisan migrate --force.
  • Variables: DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD and APP_URL from your .env.example are wired to the provisioned database and the app’s URL. APP_KEY is generated in Laravel’s base64: format.
  • Workers: php artisan queue:work, or php artisan horizon when laravel/horizon is installed.
  • Octane: with laravel/octane in composer.json and no Dockerfile, the web process runs php artisan octane:start --server=frankenphp --host=0.0.0.0 --port=$PORT automatically.
  • Reverb: with laravel/reverb in composer.json, a reverb worker running php artisan reverb:start is added for you.

Queue workers and the scheduler, as processes

queue (or horizon), reverb and a scheduler process are the same image as web, started with a different artisan command — one codebase and one build, several process types, each scaled on its own.

web: php artisan octane:start --server=frankenphp --host=0.0.0.0 --port=$PORT
queue: php artisan queue:work
scheduler: php artisan schedule:work

Railyard adds queue (or horizon when it’s installed) automatically; a scheduler process running schedule:work is offered too once routes/console.php or bootstrap/app.php schedules anything. Prefer Railyard’s own Cron instead and have it run php artisan schedule:run on a fixed interval — either works, since schedule:run only fires tasks that are actually due. Add more processes from the Workers tab, or scale what’s there from the CLI:

railyard scale my-app queue=2

Queue and cache backend

QUEUE_CONNECTION, CACHE_STORE, SESSION_DRIVER or BROADCAST_CONNECTION set to redis in your .env.example (or laravel/horizon itself) provisions Redis and injects its connection variables automatically — no addon to add by hand. The database follows the same rule: DB_CONNECTION=pgsql or mysql in .env.example decides which engine gets provisioned.

Config and secrets

Every variable Laravel’s config reads with env() is a plain var under Variables, or set with railyard env:set my-app KEY=VALUE — never baked into the image, so the same build runs unchanged from staging through production: dev/prod parity, not a rebuild per environment. APP_KEY is generated once in Laravel’s own base64: format and encrypted; third-party keys are never invented. Point at a database or Redis running as its own service on the canvas with ${{redis.RAILYARD_PRIVATE_URL}} — resolved per environment. See Variables and secrets.

Deploy it

  • From a repo: paste the Git URL, or pick it from the picker once GitHub is connected — Railyard reads composer.json and .env.example, fills in artisan migrate, the queue worker and the provisioned database, and deploys on every push.
  • From the CLI: railyard create my-app https://github.com/me/my-app --addons mysql,redis, or railyard git:remote && git push railyard main from inside the repo.
  • One click: add the deploy button to your README, or publish to the template catalog so anyone can launch it with its addons and variables already filled in.
Found an issue or have a question?
Theme
Colors