What is Laravel Sail?

- Andrés Cruz

En español

Sail is the most recent development environment for Laravel, coming out of Laravel version 8. It comes on par with other official solutions like Homestead for Windows and Valet for MacOS and community efforts like Laragon (particularly the one I use), Laradock and Vessel.

Laravel Sail is based on Docker, a technology that leverages containers to package applications so they can run quickly and easily on any operating system.

Sail's future looks bright, as the Laravel documentation already features it as the preferred way to install and run Laravel projects locally, a place that Homestead and Valet held for years.

Install Laravel Sail

Sail is the most recent development environment for Laravel, coming out of Laravel version 8. It comes on par with other official solutions like Homestead for Windows and Valet for MacOS and community efforts like Laragon (particularly the one I use), Laradock and Vessel.

Laravel Sail is based on Docker, a technology that leverages containers to package applications so they can run quickly and easily on any operating system.

curl -s "https://laravel.build/example-app?with=mysql,redis" | bash

If you don't pass the with option, Sail will set the default stack for MySQL, Redis, Meilisearch, Mailhog, and Selenium, and these new settings give you more granular control.

Referential link: https://laravel-news.com/laravel-sail-services

About Laravel Sail

Laravel Sail is a composer-installable package that offers a command line interface; Sail, is another of the environments that we have at our disposal to be able to build or serve a project in Laravel; uses Docker to run the application but offers an abstraction to the Docker configuration processes that we would have to do manually if we want to use this tool as a development environment in Laravel, therefore, all the configuration process is done by Sail for us.

Sail allows you to configure the entire project without the need to have practically anything installed at the operating system level, except Docker and maybe PHP, everything else, that is, the server, database and other dependencies, is installed in Docker; In order to use Sail you can do it without problems on Linux or Mac, in the case of Windows, you must activate and configure the Linux subsystem.

Sail is one of my favorite services and I use it on MacOS to develop my projects, as well as the projects for my books and courses that I develop on that operating system, it is very light and easy to use, it does not offer problems in general and the only thing you have to do is to take into account is to turn off any process that you have in the ports occupied by Sail when starting the service, which would be port 80 for the server or 3306, these ports can also be changed for each project in Laravel with Sail or simply turn off other services that you have installed at the operating system level.

Andrés Cruz

Desarrollo con Laravel, Django, Flask, CodeIgniter, HTML5, CSS3, MySQL, JavaScript, Vue, Android, iOS, Flutter

Andrés Cruz en Udemy