Testing out the new Umami demo profile in Drupal 8.6.x.
I wanted to post a quick guide here for the benefit of anyone else just wanting to test out how Lando works or how it integrates with a Drupal project, since the official documentation kind of jumps you around different places and doesn't have any instructions for "Help! I don't already have a working Drupal codebase!":
- Install Docker for Mac / Docker for Windows / Docker CE (if it's not already installed).
- Install Lando (on Mac,
brew cask install lando, otherwise, download the .dmg, .exe., .deb., or .rpm).
- You'll need a Drupal codebase, so go somewhere on your computer and use Git to clone it:
git clone --branch 8.6.x https://git.drupal.org/project/drupal.git lando-d8
- Change into the Drupal directory:
lando init, answering
lando start, and wait while all the Docker containers are set up.
lando composer install(this will use Composer/PHP inside the Docker container to build Drupal's Composer dependencies).
- Go to the site's URL in your web browser, and complete the Drupal install wizard with these options:
- Database host:
- Database name, username, password:
- Database host:
At the end of the
lando start command, you'll get a report of 'Appserver URLs', like:
APPSERVER URLS https://localhost:32771
You can also get this info (and some other info, like DB connection details) by running
lando info. And if you want to install Drupal without using the browser, you could run the command
lando drush site-install -y [options] (this requires Drush in your Drupal project, which can be installed via
composer require drush/drush).
It looks like Lando has a CloudFlare rule set up that redirects *.lndo.site to 127.0.0.1, and the https version uses a bare root certificate, so if you want to access the HTTPS version of the default site Lando creates, you need to add an exception to your browser when prompted.
Note that Little Snitch reported once or twice that the
landocli utility was calling out to a metrics site, likely with some sort of information about your environment for their own metrics and tracking purposes. I decided to block the traffic, and Lando still worked fine, albeit with a few
EHOSTDOWNerrors. It looks like the data it tried sending was:
Nothing pernicious; I just don't like my desktop apps sending metrics back to a central server.
For those who also use many other dev environments (some of us are crazy like that!), I wanted to note a few things specific to Lando's Docker use:
- Lando starts 3 containers by default: one for MySQL, one for Apache/PHP, and one for Traefik. The Traefik container grabs host ports
lando stopdoesn't stop the Traefik container, so whatever ports it holds won't be freed up until you run
- If another running container (or some other service) is already binding to port
lando startwill find a different free port and use that instead (e.g.