Skip to content

Repository files navigation

Drupal AI Demo: Dev Starter

A Drupal CMS 2.x demo on Lagoon — a starting point showing the full amazee.ai + Drupal AI toolkit: AI-enhanced CKEditor widgets (summarize, style-guide, alt-text generation), AI search, and webforms with their JavaScript libraries.

How it's built

The whole site is defined by the bundled recipe at recipes/drupal-org-ai-dev-starter/ — Drupal CMS starter plus the amazee.ai CKEditor Widgets recipe (the content_with_ai text format and AI automator chains), the ai_search and webform modules, and demo content as YAML. drush site:install <recipe> produces the complete demo from a clean database. Webform's front-end libraries (CodeMirror, Select2, Tippy.js, etc.) are declared as Composer package repositories so they land in web/libraries/.

amazee.ai credentials are never in the repo. They're injected per environment from AI_LLM_API_* / AI_DB_* env vars — by .lagoon/scripts/trial_install_configure.sh (fresh install) or .lagoon/scripts/polydock_post_deploy.sh (Polydock trial restore).

Local development

cp .env.example .env   # fill in your amazee.ai credentials
docker compose build
docker compose up -d
docker compose exec cli bash -c 'wait-for mariadb:3306'
docker compose exec cli bash -c 'drush -n si /app/recipes/drupal-org-ai-dev-starter && drush -y cr'

Then apply the provider recipe with your credentials (or run .lagoon/scripts/trial_install_configure.sh inside the cli container with the env vars set).

Lagoon / Polydock

On first deploy of a trial environment, polydock_post_deploy.sh fetches and restores the pre-built app-data-image.tgz (fast spin-up), then wires AI credentials from env vars. create_polydock_app_image.sh regenerates that image from a verified build — the recipe in git is the source of truth; the image is a build artifact.

Contributors

Languages