Last active
May 22, 2024 12:40
-
-
Save mattneal-stafflink/a6de7f642ba0de788e0bb2caffb9cdda to your computer and use it in GitHub Desktop.
Lando Performant Config For WordPress/Bedrock.
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
name: {{ WEBSITE NAME }} | |
recipe: wordpress | |
env_file: | |
- .env.example | |
- .lando.env | |
excludes: | |
- vendor | |
- node_modules | |
config: | |
php: "8.2" | |
via: nginx | |
database: mariadb | |
cache: redis | |
xdebug: true | |
webroot: web | |
services: | |
node: | |
type: node | |
build: | |
- npm install | |
appserver: | |
overrides: | |
# See: https://github.com/docker/for-linux/issues/264#issuecomment-763555307 | |
extra_hosts: | |
- "host.docker.internal:host-gateway" | |
environment: | |
PHP_IDE_CONFIG: "${PHP_IDE_CONFIG:-serverName=appserver}" | |
XDEBUG_MODE: "${XDEBUG_MODE:-develop,debug}" | |
XDEBUG_CONFIG: "${XDEBUG_CONFIG:-client_host=host.docker.internal discover_client_host=true}" | |
build: | |
- composer install --working-dir=/app --no-progress --no-interaction --no-progress | |
build: | |
type: node:18 | |
ssl: true | |
scanner: false | |
sendmailhog: | |
type: mailhog | |
portforward: true | |
hogfrom: | |
- appserver | |
database: | |
type: mariadb | |
portforward: true | |
cache: | |
type: redis | |
portforward: true | |
tooling: | |
dev: | |
description: install theme dependencies and compile assets when files are changed. | |
service: node | |
cmd: | |
- npm install | |
- npm run watch | |
# Be sure to update "{{ WEBSITE NAME }}" to your theme name. | |
dir: /app/web/app/themes/{{ WEBSITE NAME }} | |
redis-cli: | |
service: cache | |
flush: | |
service: appserver | |
description: Flush all caches | |
cmd: | |
- appserver: wp rewrite flush | |
- appserver: wp cache flush | |
- cache: redis-cli FLUSHDB | |
dir: /web | |
login: | |
service: appserver | |
description: Generate administrator login URL | |
cmd: >- | |
if ! command wp package path aaemnnosttv/wp-cli-login-command >/dev/null 2>&1; then | |
mkdir -p ~/.wp-cli/packages; | |
cd ~/.wp-cli/packages; | |
composer config repositories.wp-cli --unset 2>/dev/null; | |
composer require aaemnnosttv/wp-cli-login-command dev-master; | |
cd /app; | |
fi; | |
wp plugin is-active wp-cli-login-server || wp login install --activate --yes; | |
wp login as 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment