Skip to content

Instantly share code, notes, and snippets.

@Idealien
Last active October 4, 2021 21:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Idealien/42082e1b0cdb41738f475924d0527a94 to your computer and use it in GitHub Desktop.
Save Idealien/42082e1b0cdb41738f475924d0527a94 to your computer and use it in GitHub Desktop.
Lando .yml with separate DB for phpunit testing
name: local
recipe: wordpress
config:
webroot: .
xdebug: true
services:
appserver:
type: php
composer:
phpunit/phpunit: '6.5'
build_as_root:
- apt-get update -y
- apt-get install subversion nano -y
database:
run_as_root:
# Create extra databases.
- mysql -uroot -e "CREATE DATABASE IF NOT EXISTS testunit; GRANT ALL PRIVILEGES ON testunit.* TO 'wordpress'@'%' IDENTIFIED by 'wordpress';"
- mysql -uroot -e "CREATE DATABASE IF NOT EXISTS testaccept; GRANT ALL PRIVILEGES ON testaccept.* TO 'wordpress'@'%' IDENTIFIED by 'wordpress';"
mailhog:
type: mailhog
hogfrom:
- appserver
pma:
type: phpmyadmin
hosts:
- database
tooling:
proxy:
mailhog:
- mailhog.local.lndo.site
pma:
- pma.local.lndo.site
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment