name: sample-block-theme
recipe: wordpress
config:
  webroot: web
services:
  appserver:
    overrides:
      volumes:
        - ./sample-wp-block-theme/:/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
events:
  pre-rebuild:
    - 'find web -depth -regextype posix-extended -mindepth 1 ! -regex ".*sample-wp-block-theme.*" -delete || true'
  post-destroy:
    - 'find web -depth -regextype posix-extended -mindepth 1 ! -regex ".*sample-wp-block-theme.*" -delete || true'
