This bundle is generated by a single script: setup-drupal-local.sh.
It creates a complete local/dev Drupal 10 platform using Docker Compose.
Local/dev focus: HTTP only (no Let’s Encrypt). Admin UIs are bound to
127.0.0.1.
- Traefik (HTTP reverse proxy) → routes hostnames to Nginx.
- Nginx → serves Drupal files and forwards PHP requests to Drupal 10 FPM.
- Drupal 10 (FPM) → auto-installed via Drush.
- ProxySQL in front of MariaDB (safe default routes to primary).
- MariaDB primary + replica with GTID replication bootstrapped automatically.
- Redis with AUTH and mandatory Drupal integration:
- PhpRedis extension is installed in the Drupal image.
- Drupal Redis module is installed via Composer.
- Drupal is configured to use Redis as the default cache backend.
- The installer verifies Redis connectivity with AUTH + PING.
- Prometheus scrapes:
- node_exporter (host metrics)
- cAdvisor (container metrics)
- Grafana for dashboards.
- Loki for logs.
- Daily logical backups (compressed SQL dumps) from the MariaDB primary.
- Rotation keeps the last 7 dumps.
- Generated Makefile with:
make openmake healthmake tail SERVICE=...- lifecycle targets (
up,down,restart,scale, etc.)
- Docker Engine
- Docker Compose v2 plugin (
docker compose ...) - OpenSSL
- GNU Make (
make)
- RAM: 8 GB recommended (6 GB minimum)
- CPU: 4 cores recommended
- Disk: 20–30 GB free
- Make the script executable:
chmod +x setup-drupal-local.sh- Recommended run (silent port check + hosts entry):
./setup-drupal-local.sh --check-ports --add-hosts drupal.local- Watch the installer:
cd drupal-platform
make installer-logs- Validate and open:
make health
make openChecks that required ports are free before deploying. Prints nothing if all ports are available.
Adds an /etc/hosts entry if missing:
127.0.0.1 <domain>
Override host ports. Supported formats:
- CSV order:
web,traefik,grafana,prometheus,loki
./setup-drupal-local.sh --ports 8081,8082,3300,9091,3101 drupal.local- key=val pairs:
./setup-drupal-local.sh --ports web=8081,traefik=8082,grafana=3300,prometheus=9091,loki=3101 drupal.localDefaults (no port overrides):
- Drupal:
http://localhost(orhttp://drupal.local) - Traefik dashboard:
http://127.0.0.1:8080 - Grafana:
http://127.0.0.1:3000 - Prometheus:
http://127.0.0.1:9090 - Loki:
http://127.0.0.1:3100
Drupal is installed using Drush site:install with:
--db-url,--site-name,--account-name,--account-pass, etc.
- Username:
drupallocaladmin - Password:
drupallocaladminpass - Site name:
drupal.local
Deployment fails if Redis integration cannot be enforced:
- PhpRedis extension must be available.
drupal/redismust install successfully (Composer retry/backoff).- Redis module must enable successfully (Drush).
- Drupal settings must include Redis cache backend configuration.
- AUTH + PING check must pass.
From inside drupal-platform/:
make help
make up
make health
make open
make tail SERVICE=drupal
make drush CMD="status"
make scale DRUPAL_SCALE=3
make nukeThis project intentionally goes beyond “just a Drupal dev environment”. It is designed as a local, production‑style platform simulator that you can spin up repeatedly with one command.
Best-in-class strengths of our stack:
-
End-to-end platform realism (single-host)
- Explicit routing path: Traefik → Nginx → Drupal (PHP-FPM).
- Explicit data path: Drupal → ProxySQL → MariaDB primary/replica.
-
ProxySQL + replication are first-class (not bolt-ons)
- ProxySQL is included by default.
- MariaDB primary + replica and an automatic replication bootstrap are included.
-
Redis is mandatory and validated
- Enforced Drupal → Redis caching, not just “Redis is running”.
-
Monitoring is included and wired
- Prometheus + Grafana + Loki + node_exporter + cAdvisor are included by default.
-
One-shot automation + dev ergonomics
- Auto-install via Drush.
- Composer retry/backoff + persistent Composer cache.
- Options:
--check-ports,--add-hosts,--ports. - Makefile helpers.
In short: keep this stack when you want a repeatable platform lab that is close to “real infra” and not just an app sandbox.
Docker4Drupal is a mature, Compose-first Drupal stack with a large menu of Drupal services. Choose it if you want a well-known Drupal-specific stack maintained as a project and you prefer editing Compose/.env directly.
DDEV is the Drupal community’s recommended local dev workflow and is optimized for fast onboarding. Choose it when you want minimal friction for a mixed team and prefer CLI-driven workflows.
- Drupal.org DDEV guide: https://www.drupal.org/docs/getting-started/installing-drupal/install-drupal-using-ddev-for-local-development
- Custom services docs: https://docs.ddev.com/en/stable/users/extend/custom-docker-services/
- Default team dev: DDEV
- Platform lab / performance / infra validation: this one-shot stack
- Compose-native Drupal stack preference: Docker4Drupal
This repository includes a super prompt file named drupal-one-shot-prompt, placed next to setup-drupal-local.sh.
Use it with your preferred LLM to regenerate the entire project structure and one‑shot stack from scratch.
It describes required files, Compose topology, installer behavior, flags, and acceptance criteria.
Where: L2r/drupal-one-shot-prompt or at the root of the repo
Tip: Paste the super prompt into an AI assistant and ask it to generate the full repo on a clean machine; then run:
chmod +x setup-drupal-local.sh
./setup-drupal-local.sh --check-ports --add-hosts drupal.local