# Meilisearch for WordPress demos: Mission Log (blog) and Met Prints (shop). # docker compose watch # build, start, live-sync themes / mu-plugin / plugin source # open http://blog.wordpress-meilisearch-demo.orb.local and http://shop.wordpress-meilisearch-demo.orb.local name: wordpress-meilisearch-demo x-site: &site build: &site-build context: . dockerfile: Dockerfile.dev additional_contexts: plugin: ${MEILISEARCH_PLUGIN_PATH:-../../_sdk/meilisearch-wordpress} args: &site-args WORDPRESS_VERSION: ${WORDPRESS_VERSION:-7.1.2} WOOCOMMERCE_VERSION: ${WOOCOMMERCE_VERSION:-11.1.2} depends_on: mariadb: condition: service_healthy meilisearch: condition: service_healthy healthcheck: test: ["CMD-SHELL", "test -f /tmp/demo-ready && curl -fsS -o /dev/null http://localhost/wp-login.php"] interval: 10s timeout: 5s retries: 120 start_period: 30s services: meilisearch: image: getmeili/meilisearch:${MEILISEARCH_VERSION:-v1.34} environment: MEILI_MASTER_KEY: ${MEILI_MASTER_KEY:-meili-wp-demo-master-key} MEILI_ENV: development MEILI_NO_ANALYTICS: "true" ports: - "${MEILISEARCH_PORT:-7701}:7700" volumes: - meili_data:/meili_data healthcheck: test: ["CMD", "curl", "-fsS", "http://localhost:7700/health"] interval: 3s timeout: 5s retries: 30 mariadb: image: mariadb:11.4 environment: MARIADB_ROOT_PASSWORD: root MARIADB_USER: wp MARIADB_PASSWORD: wp configs: - source: mariadb-init target: /docker-entrypoint-initdb.d/10-databases.sql volumes: - db_data:/var/lib/mysql healthcheck: test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] interval: 3s timeout: 5s retries: 40 blog: <<: *site build: <<: *site-build args: <<: *site-args SITE: blog environment: SITE: blog WP_HOME: ${BLOG_HOME:-http://blog.wordpress-meilisearch-demo.orb.local} WP_ADMIN_PASSWORD: ${WP_ADMIN_PASSWORD:-admin} DB_HOST: mariadb DB_NAME: blog DB_USER: wp DB_PASSWORD: wp MEILISEARCH_HOST: ${MEILISEARCH_HOST:-http://meilisearch.wordpress-meilisearch-demo.orb.local:7700} MEILISEARCH_ADMIN_KEY: ${MEILISEARCH_ADMIN_KEY:-${MEILI_MASTER_KEY:-meili-wp-demo-master-key}} MEILISEARCH_INDEX_PREFIX: blog # Optional, for hosts whose PHP uses a private Meilisearch URL or whose key cannot create keys (see README). MEILISEARCH_PUBLIC_HOST: ${MEILISEARCH_PUBLIC_HOST:-} MEILISEARCH_SEARCH_KEY: ${MEILISEARCH_SEARCH_KEY:-} # 1 = the public deploy's lockdown: no login over HTTP (fly.toml sets it). DEMO_LOCKDOWN: ${DEMO_LOCKDOWN:-} ports: - "${BLOG_PORT:-8081}:80" volumes: - blog_html:/var/www/html develop: watch: - action: sync path: ./blog/theme target: /opt/demo/site/theme - action: sync path: ./shared/mu-plugins target: /opt/demo/mu-plugins - action: sync path: ${MEILISEARCH_PLUGIN_PATH:-../../_sdk/meilisearch-wordpress}/src target: /opt/plugins/meilisearch/src - action: sync path: ${MEILISEARCH_PLUGIN_PATH:-../../_sdk/meilisearch-wordpress}/assets target: /opt/plugins/meilisearch/assets - action: sync+restart path: ./blog/setup.php target: /opt/demo/site/setup.php - action: rebuild path: ./Dockerfile.dev - action: rebuild path: ./docker - action: rebuild path: ${MEILISEARCH_PLUGIN_PATH:-../../_sdk/meilisearch-wordpress}/composer.json shop: <<: *site build: <<: *site-build args: <<: *site-args SITE: shop environment: SITE: shop WP_HOME: ${SHOP_HOME:-http://shop.wordpress-meilisearch-demo.orb.local} WP_ADMIN_PASSWORD: ${WP_ADMIN_PASSWORD:-admin} DB_HOST: mariadb DB_NAME: shop DB_USER: wp DB_PASSWORD: wp MEILISEARCH_HOST: ${MEILISEARCH_HOST:-http://meilisearch.wordpress-meilisearch-demo.orb.local:7700} MEILISEARCH_ADMIN_KEY: ${MEILISEARCH_ADMIN_KEY:-${MEILI_MASTER_KEY:-meili-wp-demo-master-key}} MEILISEARCH_INDEX_PREFIX: shop # Optional, for hosts whose PHP uses a private Meilisearch URL or whose key cannot create keys (see README). MEILISEARCH_PUBLIC_HOST: ${MEILISEARCH_PUBLIC_HOST:-} MEILISEARCH_SEARCH_KEY: ${MEILISEARCH_SEARCH_KEY:-} # 1 = the public deploy's lockdown: no login over HTTP (fly.toml sets it). DEMO_LOCKDOWN: ${DEMO_LOCKDOWN:-} ports: - "${SHOP_PORT:-8082}:80" volumes: - shop_html:/var/www/html develop: watch: - action: sync path: ./shop/theme target: /opt/demo/site/theme - action: sync path: ./shared/mu-plugins target: /opt/demo/mu-plugins - action: sync path: ${MEILISEARCH_PLUGIN_PATH:-../../_sdk/meilisearch-wordpress}/src target: /opt/plugins/meilisearch/src - action: sync path: ${MEILISEARCH_PLUGIN_PATH:-../../_sdk/meilisearch-wordpress}/assets target: /opt/plugins/meilisearch/assets - action: sync+restart path: ./shop/setup.php target: /opt/demo/site/setup.php - action: rebuild path: ./Dockerfile.dev - action: rebuild path: ./docker - action: rebuild path: ${MEILISEARCH_PLUGIN_PATH:-../../_sdk/meilisearch-wordpress}/composer.json configs: mariadb-init: content: | CREATE DATABASE IF NOT EXISTS blog CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE DATABASE IF NOT EXISTS shop CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; GRANT ALL PRIVILEGES ON blog.* TO 'wp'@'%'; GRANT ALL PRIVILEGES ON shop.* TO 'wp'@'%'; volumes: meili_data: db_data: blog_html: shop_html: