Skip to content

Instantly share code, notes, and snippets.

@omarlopesino
Last active May 6, 2019 06:34
Show Gist options
  • Save omarlopesino/cbbda5d629aea9ba2480a2ee722a1bc8 to your computer and use it in GitHub Desktop.
Save omarlopesino/cbbda5d629aea9ba2480a2ee722a1bc8 to your computer and use it in GitHub Desktop.
Docker4drupal xdebug for cli and web
php:
image: wodby/drupal-php:$PHP_TAG
container_name: "${PROJECT_NAME}_php"
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
DB_HOST: $DB_HOST
DB_USER: $DB_USER
DB_PASSWORD: $DB_PASSWORD
DB_NAME: $DB_NAME
DB_DRIVER: $DB_DRIVER
## Read instructions at https://wodby.com/stacks/drupal/docs/local/xdebug/
PHP_XDEBUG: 1
PHP_XDEBUG_DEFAULT_ENABLE: 1
PHP_XDEBUG_REMOTE_CONNECT_BACK: 0
# Replace [idekey] with netbeans-xdebug (netbeans) or PHPSTORM (phpstorm).
PHP_XDEBUG_IDEKEY: [idekey]
# Use PHP_IDE_CONFIG for phpstorm, XDEBUG_CONFIG for netbeans.
# PHP_IDE_CONFIG: serverName=[servername]
# XDEBUG_CONFIG: serverName=netbeans-xdebug
PHP_XDEBUG_REMOTE_HOST: 172.17.0.1 # Linux
# PHP_XDEBUG_REMOTE_HOST: 10.254.254.254 # macOS
# PHP_XDEBUG_REMOTE_HOST: 10.0.75.1 # Windows
# PHP_XDEBUG_REMOTE_HOST: host.docker.internal
volumes:
# - ./:/var/www/html
## For macOS users (https://wodby.com/stacks/drupal/docs/local/docker-for-mac/)
- ./:/var/www/html:cached # User-guided cachingç
# - ./reports/xdebug:/mnt/files/xdebug/ # Xdebug profiler
# - docker-sync:/var/www/html # Docker-sync
## For Xdebug profiler files
# - files:/mnt/files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment