REQUIREMENTS: Lando 3.0.0-RC.2+ - Tested on 3.0.6. Download the latest Lando release from: https://github.com/lando/lando/releases.
Recipes for Lando - Docker containers. Tested with Joomla, WordPress, PrestaShop, etc.
These Recipes configure a local development site based on Lando and Docker with the most common tools for Lamp and CMS development. It is based on Lando and Docker. So, all the available tooling can also be applied to these recipes.
For a general introduction: Devops with Lando and Docker, By Anibal Sanchez, Extly.Tech. Ubucon Europe - Xixón, Spain - 27-29th of April 2018. Slides: joo.nu/devops
In my practice, I have configured the recipes to have the following services:
- A LAMP site, on the
www
folder - phpMyAdmin, to handle the administration of MySQL
- MailHog, to handle SMTP testing of mails
Available customized Lando recipes:
- Drupal
- Joomla
- General LAMP
- PrestaShop
- WordPress
- Choose which CMS you want to install and copy only those files into the destination folder
mydevsite
(remember to also copy the hidden.lando.yml
). Follow the next steps.
Open the .lando.yml
and replace the $replace-with-a-name$
(including the $) with the myname of your local development site.
The recipe is going to create:
- A site with the myname
A database with these connection settings:
- Host Name: database
- User mynamedb
- Password mynamedb
- Database: mynamedb
- To start the Docker container:
lando start
After starting the container, you will receive a command line output like this one:
BOOMSHAKALAKA!!!
Your app has started up correctly.
Here are some vitals:
NAME myname
LOCATION /home/myuser/mysites/mydevsite
SERVICES appserver, database, pma, mailhog
APPSERVER URLS https://localhost:32775
http://localhost:8080
http://localhost:32774
http://myname.lndo.site
https://myname.lndo.site
PMA URLS http://localhost:32769
http://phpmyadmin.lndo.site
https://phpmyadmin.lndo.site
MAILHOG URLS http://localhost:32773
http://mailhog.lndo.site
https://mailhog.lndo.site
Great! The site is ready, and available on APPSERVER URLS, there is also a phpmyadmin and a mailhog.
- To stop the Docker container:
lando stop
- To restart the Docker container:
lando restart
- To rebuild the Docker container:
lando rebuild
- To destroy the Docker container (destroy for ever):
lando destroy
- To access the mysql server:
lando mysql
- To download the latest Joomla zip file and extract it to the www folder:
lando install
After extraction, visit one of the APPSERVER URLS to complete the installation. For example: http://localhost:8080.
- To apply my development configuration to a site:
lando dev-config
This is handy script to disable security plugins, CDNs, disable cache, configure the MailHog, etc.
- To download and extract an Akeeba backup with kickstart:
lando kick-restore
After the extraction, visit the site to complete the installation. For instance: http://localhost:8080/k.php.
After the installation, remember to execute lando dev-config
, to apply the best practices.
- To extract and install an Akeeba backup with unite:
lando unite-restore
NOTE: unite.phar
must be copied into /home/-user-/.lando
.
After the installation, remember to execute lando dev-config
, to apply the best practices.
- To extract and install an Akeeba backup from amazon s3 with unite:
lando unite-restore-s3
You will be asked for the filename (without the extension), the s3 bucket, the s3 region and the filepath.
After the installation, remember to execute lando dev-config
, to apply the best practices.
- To intall an extension
lando install-extension
The extension must be copied into the tmp/ folder and named "the-extension.zip".
- To intall the Patch Tester for the Joomla, Pizza, Bugs and Fun session.
lando install-patchtester
Open the .lando.yml
and replace the $replace-with-a-name$
with the myname of your local development site. For instance, $replace-with-a-name$
can be replaced with wp
.
The recipe is going to create:
- A site with the myname. In our case, we use
wp
.
A database with these connection settings:
- Host Name: database
- User mynamedb (
wpdb
) - Password mynamedb (
wpdb
) - Database: mynamedb (
wpdb
)
- To start the Docker container:
lando start
After starting the container, you will receive a command line output like this one:
BOOMSHAKALAKA!!!
Your app has started up correctly.
Here are some vitals:
NAME wp
LOCATION /home/anibal/...../wp
SERVICES appserver, database, pma, mailhog
APPSERVER URLS https://localhost:33928
http://localhost:8080
http://localhost:33929
http://wp.lndo.site
https://wp.lndo.site
PMA URLS http://localhost:33927
http://phpmyadmin.lndo.site
https://phpmyadmin.lndo.site
MAILHOG URLS http://localhost:33930
http://mailhog.lndo.site
https://mailhog.lndo.site
Great! The site is ready, and available on APPSERVER URLS, there is also a phpmyadmin and a mailhog.
- To stop the Docker container:
lando stop
- To restart the Docker container:
lando restart
- To rebuild the Docker container:
lando rebuild
- To destroy the Docker container (destroy for ever):
lando destroy
- To access the mysql server:
lando mysql
To install WordPress, you can download the latest WordPress zip file and extract it to the www folder, then install it from there following the usual process. As a handy way to support it in the receipe, I have configured a command, based on Lando tooling to use WP CLI, to install Wordpress and Gutenberg plugin with a single line:
lando install
Open the .lando.yml
and replace the $replace-with-a-name$
(including the $) with the myname of your local development site. For instance, in this sample recipe, $replace-with-a-name$
has been replaced with ps
.
The recipe is going to create:
- A site with the myname. In this sample recipe,
ps
.
A database with these connection settings:
- Host Name: database
- User mynamedb (
psdb
) - Password mynamedb (
psdb
) - Database: mynamedb (
psdb
)
- To start the Docker container:
lando start
After starting the container, you will receive a command line output like this one:
BOOMSHAKALAKA!!!
Your app has started up correctly.
Here are some vitals:
NAME ps
LOCATION /home/anibal/...../ps
SERVICES appserver, database, pma, mailhog
APPSERVER URLS https://localhost:33887
http://localhost:8080
http://localhost:33886
http://ps.lndo.site
https://ps.lndo.site
PMA URLS http://localhost:33888
http://phpmyadmin.lndo.site
https://phpmyadmin.lndo.site
MAILHOG URLS http://localhost:33885
http://mailhog.lndo.site
https://mailhog.lndo.site
Great! The site is ready, and available on APPSERVER URLS, there is also a phpmyadmin and a mailhog.
- To stop the Docker container:
lando stop
- To restart the Docker container:
lando restart
- To rebuild the Docker container:
lando rebuild
- To destroy the Docker container (destroy for ever):
lando destroy
- To access the mysql server:
lando mysql
- To install the latest PrestaShop, please download the zip file (https://www.prestashop.com/en/previous-versions) and copy it into the www folder. Then, execute this command:
lando install
After installation, visit one of the APPSERVER URLS. In our case, https://ps.lndo.site. The administrator credentials are:
- Username: [email protected]
- Password: 0123456789
- Copyright (c)2012-2020 Extly, CB. All rights reserved.
- Distributed under the MIT license