-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f4fca03
commit 87db9df
Showing
11 changed files
with
152 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mariadb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
WordPress MariaDB Example | ||
========================= | ||
|
||
This example exists primarily to test the following documentation: | ||
|
||
* [WordPress Recipe](https://docs.devwithlando.io/tutorials/wordpress.html) | ||
|
||
Start up tests | ||
-------------- | ||
|
||
Run the following commands to get up and running with this example. | ||
|
||
```bash | ||
# Should poweroff | ||
lando poweroff | ||
|
||
# Should initialize the latest WordPress codebase | ||
rm -rf mariadb && mkdir -p mariadb && cd mariadb | ||
cp -f ../../.lando.upstream.yml .lando.upstream.yml && cat .lando.upstream.yml | ||
lando init --source remote --remote-url https://wordpress.org/latest.tar.gz --recipe wordpress --webroot wordpress --name lando-wordpress-mariadb --option php=8.3 --option database=mariadb:11.3 | ||
|
||
# Should start up successfully | ||
cd mariadb | ||
lando start | ||
``` | ||
|
||
Verification commands | ||
--------------------- | ||
|
||
Run the following commands to validate things are rolling as they should. | ||
|
||
```bash | ||
# Should return the WordPress installation page by default | ||
cd mariadb | ||
lando ssh -s appserver -c "curl -L localhost" | grep "WordPress" | ||
|
||
# Should use 8.3 as the default php version | ||
cd mariadb | ||
lando php -v | grep "PHP 8.3." | ||
|
||
# Should be running apache 2.4 by default | ||
cd mariadb | ||
lando ssh -s appserver -c "apachectl -V | grep 2.4" | ||
lando ssh -s appserver -c "curl -IL localhost" | grep Server | grep 2.4 | ||
|
||
# Should be running mariadb 11.3.x by default | ||
cd mariadb | ||
lando mariadb -V | grep 11.3. | ||
|
||
# Should not enable xdebug by default | ||
cd mariadb | ||
lando php -m | grep xdebug || echo $? | grep 1 | ||
|
||
# Should use the default database connection info | ||
cd mariadb | ||
lando mariadb -uwordpress -pwordpress wordpress -e quit | ||
|
||
# Should use the default mariadb config file | ||
cd mariadb | ||
lando ssh -s database -c "cat /opt/bitnami/mariadb/conf/my_custom.cnf" | grep "innodb_lock_wait_timeout = 121" | ||
lando mariadb -u root -e "show variables;" | grep innodb_lock_wait_timeout | grep 121 | ||
|
||
# Should have the 2.x wp-cli | ||
cd mariadb | ||
lando wp cli version | grep "WP-CLI 2." | ||
|
||
# Should create a wp-config file | ||
cd mariadb/wordpress | ||
lando wp config create --dbname=wordpress --dbuser=wordpress --dbpass=wordpress --dbhost=database --force | ||
|
||
# Should be able to install wordpress | ||
cd mariadb/wordpress | ||
lando wp core install --url=lando-wordpress.lndo.site --title=LandoPress --admin_user=admin --admin_email=mike@pirog.com --skip-email | ||
``` | ||
|
||
Destroy tests | ||
------------- | ||
|
||
Run the following commands to trash this app like nothing ever happened. | ||
|
||
```bash | ||
# Should be destroyed with success | ||
cd mariadb | ||
lando destroy -y | ||
lando poweroff | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.