Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
docker-compose
environment
.lando.dist.yml Get LANDO talking to LEIA again Jan 24, 2019
.lando.local.yml
.lando.yml
README.md
compose.yml
defaults.env
info.php #1376: Fixed regression causing LANDO_INFO to set index values instea… Feb 2, 2019

README.md

Basics Example

This example exists primarily to test the following documentation:

Basics

CLI

See the Landofiles in this directory for the exact magicks.

Start up tests

# Should start successfully
lando poweroff
lando start

Verification commands

Run the following commands to verify things work as expected

# Should merge in all Landofiles correctly
docker ps --filter label=com.docker.compose.project=landobase | grep landobase_log_1
docker ps --filter label=com.docker.compose.project=landobase | grep landobase_web_1
docker ps --filter label=com.docker.compose.project=landobase | grep landobase_web2_1

# Should merge in all Landofiles correctly even if we are down a directory
cd docker-compose
docker ps --filter label=com.docker.compose.project=landobase | grep landobase_log_1
docker ps --filter label=com.docker.compose.project=landobase | grep landobase_web_1
docker ps --filter label=com.docker.compose.project=landobase | grep landobase_web2_1
cd ..

# Should load environment files from all Landofiles
lando ssh -s web -c "env" | grep "MILEY=CYRUS"
lando ssh -s web -c "env" | grep "TAYLOR=SWIFT"
lando ssh -s web -c "env" | grep "LOCAL=LANDO"

# Should load environment files from all Landofiles if we are down a directory
cd environment
lando ssh -s web -c "env" | grep "MILEY=CYRUS"
lando ssh -s web -c "env" | grep "TAYLOR=SWIFT"
lando ssh -s web -c "env" | grep "LOCAL=LANDO"
cd ..

# Should return lando help
lando config --help | grep verbose
lando config --lando | grep verbose

# Should return the version
lando version | grep 3.0.0

# Should run with specified verbosity
lando config -v | grep info
lando config -vv | grep verbose
lando config -vvv | grep debug
lando config -vvvv | grep silly

# Should run lando config without error
lando config

# Should only show specified field in lando config
lando config -f mode | grep mode | grep cli
lando config --field mode | grep recipes || echo $? | grep 1

# Should run lando info without error
lando info

# Should return docker inspect data
lando info -d | grep NetworkSettings
lando info --deep | grep NetworkSettings

# Should list this apps containers
lando list | grep landobase_log_1
lando list | grep landobase_web_1
lando list | grep landobase_web2_1

# Should return logs without error
lando logs

# Should return only logs for the specified service
lando logs -s web2 | grep log_1 || echo $? | grep 1
lando logs --service web2 | grep log_1 || echo $? | grep 1

# Should run a command as the LANDO_WEBROOT_USER by default
lando ssh -s web2 -c "id | grep \\\$LANDO_WEBROOT_USER"

# Should run a command as the user specific
lando ssh -s web2 -u root -c "id | grep root"

# Should stop the apps containers
lando stop
docker ps --filter label=com.docker.compose.project=landobase -q | wc -l | grep 0

# Should stop ALL running lando containers
lando start
docker ps --filter label=io.lando.container=TRUE -q | wc -l | grep 3
lando poweroff
docker ps --filter label=io.lando.container=TRUE -q | wc -l | grep 0

# Should rebuild the services without errors
lando rebuild -y
docker ps --filter label=com.docker.compose.project=landobase | grep landobase_log_1
docker ps --filter label=com.docker.compose.project=landobase | grep landobase_web_1
docker ps --filter label=com.docker.compose.project=landobase | grep landobase_web2_1

# Should only rebuild the specified services
lando rebuild -y --service web2
lando rebuild -y -s web2
docker ps --latest | grep landobase_web2_1
docker ps --filter label=com.docker.compose.project=landobase | grep landobase_log_1
docker ps --filter label=com.docker.compose.project=landobase | grep landobase_web_1
docker ps --filter label=com.docker.compose.project=landobase | grep landobase_web2_1

# Should restart the services without errors
lando restart
docker ps --filter label=com.docker.compose.project=landobase | grep landobase_log_1
docker ps --filter label=com.docker.compose.project=landobase | grep landobase_web_1
docker ps --filter label=com.docker.compose.project=landobase | grep landobase_web2_1

# Should have non-numeric keys in LANDO_INFO
lando php info.php

Destroy tests

# Should destroy successfully
lando destroy -y
lando poweroff