Skip to main content

Reference

Run drush commands inside the Drupal container of the active context. This wraps “docker compose exec drupal drush” and automatically injects DRUPAL_DRUSH_URI so --uri does not need to be specified manually. Examples: sitectl isle drush status # Check Drupal status sitectl isle drush cr # Clear all caches sitectl isle drush cex # Export configuration sitectl isle drush cim # Import configuration sitectl isle drush sqlq “SHOW TABLES” # Run a SQL query sitectl isle drush --context prod status # Check status on the prod context
sitectl drupal drush [COMMAND]

How it works

sitectl finds the Drupal service container using the Compose labels on the running containers, then runs drush inside it using the Docker exec API. The command inherits your terminal — interactive commands and output work as you’d expect. DRUPAL_DRUSH_URI is injected automatically so Drush knows the correct base URL for the site without you needing to pass --uri on every invocation.