Add Lando

This commit is contained in:
3wc 2024-01-11 22:59:00 -03:00
parent 055d993259
commit 2da7726458
3 changed files with 32 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/web/

17
.lando.yml Normal file
View File

@ -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/

View File

@ -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