Skip to content

drupal serve

Paulo Maia Carvalho edited this page May 20, 2026 · 1 revision

drupal-serve

Start the Drupal development stack: nginx + PHP-FPM + database, running as Docker sibling containers.

Usage

/drupal-serve
/drupal-serve db=postgres
/drupal-serve port=8086

Parameters

Parameter Default Options
db asks if not configured mariadb, postgres, sqlite
port auto-detect from 8085 any available port

What it does

  1. Checks for a Drupal project at /workspace/drupal. Warns if not found (soft warning — stack can still start).
  2. Checks for Docker socket — fails immediately if Docker is not available.
  3. Selects database — reads from existing stack config, or asks if first run.
  4. Detects port conflicts — starts from 8085 and increments until a free port is found.
  5. Generates Docker compose config in /workspace/.piclaw/stack/ using the project templates.
  6. Starts the stack: docker compose up -d
  7. Waits for health checks — polls until the web container responds or times out (30 s).
  8. Reports the URLhttp://localhost:<port>

Stack components

Container Image Role
nginx nginx:alpine Web server / reverse proxy
php-fpm Custom PHP 8.3 image PHP execution
db mariadb:11 / postgres:16 Database

Notes

  • Uses sibling container mode: the DrupalClaw workspace container (drupalclaw) spawns the Drupal stack containers via the host Docker socket. They share a Docker network.
  • The Drupal project at /workspace/drupal is mounted into the PHP-FPM container at /var/www/html.
  • SQLite mode skips the database container entirely.

Related skills

  • drupal-stack — full lifecycle management (stop, restart, destroy)
  • drupal-init — initialise the Drupal project first
  • drupal-status — verify the project and stack are healthy

Clone this wiki locally