Skip to content

Latest commit

 

History

History
104 lines (75 loc) · 2.93 KB

File metadata and controls

104 lines (75 loc) · 2.93 KB

Lando Drupal base - php8, nginx, postgres

This example exists primarily to test the following documentation:

Start up tests

Run the following commands to get up and running with this example.

# Should remove any previous runs and poweroff
lando --clear
lando destroy -y
lando poweroff

# Should start up our Lagoon Drupal site successfully
lando start

Verification commands

Run the following commands to validate things are rolling as they should.

# Should be able to site install via Drush
lando drush si -y
lando drush cr -y
lando drush status | grep "Drupal bootstrap" | grep "Successful"

# Should have all the services we expect
docker ps --filter label=com.docker.compose.project=drupalpostgres | grep Up | grep drupalpostgres_nginx_1
docker ps --filter label=com.docker.compose.project=drupalpostgres | grep Up | grep drupalpostgres_postgres_1
docker ps --filter label=com.docker.compose.project=drupalpostgres | grep Up | grep drupalpostgres_mailhog_1
docker ps --filter label=com.docker.compose.project=drupalpostgres | grep Up | grep drupalpostgres_php_1
docker ps --filter label=com.docker.compose.project=drupalpostgres | grep Up | grep drupalpostgres_cli_1
docker ps --filter label=com.docker.compose.project=drupalpostgres | grep Up | grep drupalpostgres_lagooncli_1

# Should ssh against the cli container by default
lando ssh -c "env | grep LAGOON=" | grep cli-drupal

# Should have the correct environment set
lando ssh -c "env" | grep LAGOON_ROUTE | grep drupal-postgres.lndo.site
lando ssh -c "env" | grep LAGOON_ENVIRONMENT_TYPE | grep development

# Should be running PHP 8
lando ssh -c "php -v" | grep "PHP 8"

# Should have composer
lando composer --version

# Should have php cli
lando php --version

# Should have drush
lando drush --version

# Should have npm
lando npm --version

# Should have node
lando node --version

# Should have yarn
lando yarn --version

# Should have lagoon cli
lando lagoon --version | grep lagoon

# Should have a running Drupal site served by nginx on port 8080
lando ssh -s cli -c "curl -kL http://nginx:8080" | grep "Welcome to Drush Site-Install"

# Check PostgreSQL version is 11.*
lando psql -V

# Should be able to show the database connection info
lando psql drupal -c "\\conninfo" | grep drupal | grep 5432

# Should be able to show the Drupal tables
lando psql drupal -P pager=off -c "\\dt" | grep users

# Should be able to db-export and db-import the database
lando db-export test.sql
lando db-import test.sql.gz
rm test.sql*

# Shoud be able to rebuild and persist the database
lando rebuild -y
lando psql drupal -P pager=off -c "\\dt" | grep users

Destroy tests

Run the following commands to trash this app like nothing ever happened.

# Should be able to destroy our Drupal site with success
lando destroy -y
lando poweroff