From 2da7726458e05355c7bfd659228ce4d188a6db6f Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Thu, 11 Jan 2024 22:59:00 -0300 Subject: [PATCH] Add Lando --- .gitignore | 1 + .lando.yml | 17 +++++++++++++++++ README.md | 14 ++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 .gitignore create mode 100644 .lando.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7a25002 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/web/ diff --git a/.lando.yml b/.lando.yml new file mode 100644 index 0000000..9609c8c --- /dev/null +++ b/.lando.yml @@ -0,0 +1,17 @@ +name: sample-block-theme +recipe: wordpress +config: + webroot: web +services: + appserver: + overrides: + volumes: + - ./:/app/web/wp-content/themes/sample-wp-block-theme + build: + - wp --path=/app/web/ core download + - wp --path=/app/web/ config create --skip-check --force --dbuser=wordpress --dbname=wordpress --dbpass=wordpress --dbhost=database + # - wp --path=/app/web/ core install --title="Dev Env" --admin_user=admin --admin_password=admin --admin_email=admin@example.com --skip-email --url=https://sample-block-theme.lndo.site/ + # - wp --path=/app/web/ theme activate sample-wp-block-theme +events: + pre-rebuild: + - rm -rf web/ diff --git a/README.md b/README.md index 8fbfed5..b5c8109 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ Repo for practice task for Autonomic front-end recruitment. ## Running the site locally +### `wp-env` + You can launch an instance of WordPress pre-loaded with this theme using the `wp-env` tool. ```sh @@ -24,3 +26,15 @@ $ wp-env start This will launch a WordPress local instance at http://localhost:8888. You can log into the dashboard at http://localhost:8888/wp-admin with `admin` as the username and `password` as the password. +### Lando + +```sh +$ lando start +$ lando wp --path=/app/web/ core install \ + --title="Dev Env" \ + --admin_user=admin --admin_password=admin --admin_email=admin@example.com \ + --skip-email --url=https://sample-block-theme.lndo.site/ +$ lando wp --path=/app/web/ theme activate sample-wp-block-theme +``` + +### docker-compose