1
Here are a few examples...
lando init
lando init --source cwd \
--recipe mean \
--option port=3000 \
--option command="yarn watch" \
--name meanest-app-youve-ever-seen
lando init --source pantheon
lando init \
--source remote \
--remote-url https://ftp.drupal.org/files/projects/drupal-7.71.tar.gz \
--remote-options="--strip-components 1" \
--recipe drupal7 --webroot . \
--name hello-drupal7
2
Here is a progressively complexifying WordPress example...
name: my-app
recipe: wordpress
name: my-app
recipe: wordpress
config:
database: postgres
php: '7.3'
xdebug: true
name: my-app
recipe: wordpress
config:
database: postgres
php: '7.3'
xdebug: true
config:
php: my-custom-php.ini
proxy:
pma:
- database-my-app.lndo.site
services:
index:
type: solr
node:
type: node:10
globals:
gulp: latest
pma:
type: phpmyadmin
hosts:
- database
tooling:
yarn:
service: node
node:
service: node
name: my-app
recipe: wordpress
config:
database: postgres
php: '7.3'
xdebug: true
config:
php: my-custom-php.ini
events:
post-db-import:
- appserver: wp search-replace
proxy:
pma:
- database-my-app.lndo.site
services:
appserver:
build_as_root:
- apt update -y && apt-get install vim -y
- /helpers/my-script-to-install-php-extension.sh memcached
build:
- composer install
overrides:
environment:
APP_LEVEL: dev
TAYLOR: swift
index:
type: solr
node:
type: node:10
globals:
gulp: latest
build:
- yarn
frontend:
type: node:10
command: yarn start
build:
- yarn
pma:
type: phpmyadmin
hosts:
- database
tooling:
yarn:
service: node
node:
service: node
gulp:
service: node
test:
cmd:
- appserver: composer test
- frontend: yarn test
deploy:
service: appserver
cmd: /path/to/script.sh
3
Here are some commands for our complex WordPress config above.
lando start
# See what tools are available in your app
lando
# Run wp-cli commands
lando wp
# Drop into a postgres shell
lando psql
# Import a database
lando db-import dump.sql
# Run composer and yarn tests
lando test
# Install more node packages
lando yarn add bootstrap
# Start up gulp watch
lando gulp watch
4
Once you are feeling good about your Landofile, commit it to your repository so other developers can easily get spun up.
git add .lando.yml
git commit -m "Supercharge my dev"
git push
git clone my-project & cd my-project & lando start
5
Enjoy the benefits of lives-in-repo config, per-app local dev dependency management and standardization.