Setting up your local development environment
Local development is a crucial part of the software development process. It allows developers to test their code in a controlled environment before deploying it to a live server. In recent years, containerization has become an increasingly popular method for setting up local development environments thanks to its flexibility, portability, and ease of use. During my career, I have used many popular tools for setting up containerized local development environments, but I would like to specifically talk about Lando and Laravel Sail.
Lando
Lando is a Docker wrapper that provides a simple and intuitive way to manage Docker-based development environments. It automates the creation of Docker containers, simplifies the configuration process, and provides easy-to-use commands for managing the environment. With Lando, you can easily set up a local development environment for your project in just a few minutes. What I like the most is that it generates an SSL certificate for your test domain, the syntax is very intuitive, and you can save a lot of time compared to a complex docker-compose.yml or Docker file.
php:
preset: laravel
disabled:
- no_unused_imports
finder:
not-name:
- index.php
- server.php
js:
finder:
not-name:
- webpack.mix.js
css: true
Laravel Sail
Laravel Sail is a pre-configured Docker environment for Laravel, a popular PHP framework. Sail provides a set of pre-configured Docker containers that include all the necessary dependencies for running Laravel applications, such as a web server, a database server, and a queue worker. With Sail, developers can set up a fully functional Laravel development environment with just a single command.
Conclusion
In conclusion, Lando and Laravel Sail are powerful tools for setting up local development environments with Docker. With just a few commands, we can set up fully functional development environments for our projects, complete with all the necessary dependencies. This makes it easier to develop and test code in a controlled environment before deploying it to a live server. If you’re looking for a fast, reliable, and easy-to-use way to set up local development environments with Docker, Lando and Laravel Sail are great options to consider.