Tutorials

Using Lando to develop under Docker !

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

Overview В· Lando Documentation

Looking for a new gig? A Lando friend is hiring!

https://docs.devwithlando.io/

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.

WordPress Recipes!

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.

A Lire Aussi:  3 minutes to install WordPress!

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

lando/lando

lando/lando

You look absolutely beautiful! Contribute to lando/lando development by creating an account on GitHub.

https://github.com/lando/lando

Ne ratez aucun de mes articles, abonnez vous à ma newsletter

(1 mail par mois s'il y a du nouveau contenu)

About the Author

Avatar - Sebastien Serre

Sebastien Serre

Passionate about the web since the late 1990s, I have developed over the years skills in web creation. Creating WordPress websites since 2006 and developing exclusively on Wordpress since 2014. I would create the site or WordPress extension you need. Developer of extensions, Core contributor, Moderator on the WPFR forum, WordPress translator and speaker on WordCamp, my life is punctuated by WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

risus mattis efficitur. Praesent commodo elit. velit, tempus accumsan consequat.