complete-laravel-on-railway

This starter app deploys a simple majestic Laravel monolith with 5 (web, worker, cron, mysql, and redis) services on Railway

Stars
4

Complete Laravel (Breeze, MySQL, Redis) on Railway

This complete Laravel starter template deploys a Laravel Breeze app as a majestic monolith that is connected to a MySQL database and Redis Cache on Railway Paas.

It spins up 5 services with the same codebase:

  • web service: This runs the app.
  • worker service: This runs the Laravel queue workers.
  • cron service: This runs the Laravel scheduler and takes care of all cron tasks.
  • MySQL: This is the MySQL database that the app is connected to.
  • Redis: This is the queue and cache store/database that the app is connected to.

Configuration

  • Deploy the template on Railway.
  • Copy the .env.example to your service variables on Railway dashboard and set them accordingly.
  • Add a DB_URL variable with its value as the deployed MySQL PUBLIC URL to the (web, worker & cron services).
  • Add a REDIS_URL variable with its value as the deployed REDIS PUBLIC URL to the (web, worker & cron services).

Note: You can use shared variables to reduce duplication of variables across multiple services.

License

This is open-sourced software licensed under the MIT license.

Badges
Extracted from project README
Deploy on Railway