Skip to content

Gizra/drupal-static-elasticsearch

Repository files navigation

Build Status

Drupal Static, with Elasticsearch

Read the blog post.

Scaffolded from Gizra/drupal-starter.

Requirements

Note that the demo app assumes you also have mkcert installed as part of ddev.

Installation

ddev composer install
cp .ddev/config.local.yaml.example .ddev/config.local.yaml
ddev restart

Site Snapshot

Create

ddev robo snapshot:create

Command will:

  1. Clear cache.
  2. Export Static site.
  3. Create Elasticsearch index clone with a unique identifier (timestamp).
  4. Add the new Elasticsearch index url to the JS file of the Elm app.

View

As the Robo command will indicate, you can view the static site by running:

ddev . npx http-server ../.wget-export/drupal-static-elasticsearch.ddev.site+4443/

This will start a local http-server, and indicate the URL you can open to view the site.