A few months ago, it was tested to manage development environments. The major advantage of Docker is to develop locally on the technical basis of the server. Admit that it is tempting when on sites hosted by different providers (Even if at the moment they are at O2Switch) with the software versions of PHP, Mysql, Mariadb different. The major disadvantage of Docker, my humble opinion, lies in the complexity of the configuration! I had never managed to run multiple times in real time!
With Lando, all become simple!
Chatting with a friend on Slack, I’ve discovered Lando.
Overview В· Lando Documentation
Looking for a new gig? A Lando friend is hiring!
To use Lando, you first need to install Docker, then Lando comes overlay. It will greatly facilitate the configuration of different Docker images to use to run your environment.
Lando offers “Recipe”, literally recipes for the main CMS and Frameworks of the market including WordPress.
With the WordPress recipe, Lando will create an environment including PHP, and Mariadb to run your site but also wp-cli !
In short, in a few seconds of launch, you are ready to develop on your favorite CMS.
A simplified configuration for Docker!
Here is an example of the .lando.yml configuration file that you will need to have at the root of your project to launch your Lando instance!
name: test recipe: wordpress config: webroot: . php: '7.0' xdebug: true database: mariadb services: pma: type: phpmyadmin hosts: - database - old-test mailhog: type: mailhog hogfrom: - appserver old-test: type: mariadb portforward: true creds: user: wordpress password: wordpress database: old-test tooling: composer: service: appserver
This is a simple text file in .yml format that will be read by Lando so that it can create your environment.
Note a “name”, this one will be used to create your local development url! as well as the services you want to create and in which version! Here I chose a PHP version 7.0, Mariadb in its current stable version, Phpmyadmin, Mailhog to “catch mails” out without having mail server to configure. There is also the configuration of a second database server ‘old-test’, the activation of Xdebug and Composer! Lando sur Github