• Reading time ~ 1 min
  • 01.02.2023

Laravel Fleet is a package by Andrew Schmelyun to run multiple Laravel Sail websites locally with custom domain names:

Laravel Sail uses Docker and Docker Compose to spin up containers that create a local development environment for your application.

By default, the containers are bound to the :80 port of your local machine. Spinning up a second application results in a failure due to port conflicts, but you can always adjust it so that the second app is available at something like :8081

Instead, Fleet provides a small set of commands that alter your docker-compose.yml file to provide support for Traefik, a reverse proxy that runs on a Docker container.

This package provides artisan commands to add Fleet support to an application. Once you install the Fleet package, you can add your application using the fleet:add command:

php artisan fleet:add
php artisan fleet:add my-app.localhost
./vendor/bin/sail up

And your application should be available using the domain provided. Using the fleet:stop Artisan command, you can stop all fleet-powered applications. Check out aschmelyun/fleet for complete setup instructions and documentation.

Andrew also has a YouTube video if you want a deeper dive into using Traefik to manage multiple sites with Docker Compose.

Comments

No comments yet
Yurij Finiv

Yurij Finiv

Full stack

ABOUT

Professional Fullstack Developer with extensive experience in website and desktop application development. Proficient in a wide range of tools and technologies, including Bootstrap, Tailwind, HTML5, CSS3, PUG, JavaScript, Alpine.js, jQuery, PHP, MODX, and Node.js. Skilled in website development using Symfony, MODX, and Laravel. Experience: Contributed to the development and translation of MODX3 i...

About author CrazyBoy49z
WORK EXPERIENCE
Contact
Ukraine, Lutsk
+380979856297