Skip to content

Instantly share code, notes, and snippets.

@dmurphy1
Created February 9, 2017 21:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dmurphy1/ee62085eef2d40b279cc848f88213fc9 to your computer and use it in GitHub Desktop.
Save dmurphy1/ee62085eef2d40b279cc848f88213fc9 to your computer and use it in GitHub Desktop.
Sample docker-compose.yml for use with Docker4Drupal and savaslabs/node-php-composer image
version: "2"
services:
mariadb:
image: wodby/drupal-mariadb
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 1
MYSQL_DATABASE: drupal
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
# command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci # The simple way to override the mariadb config.
volumes:
- mysql-data:/var/lib/mysql
- ./db:/docker-entrypoint-initdb.d # Place init .sql file(s) here.
php:
image: wodby/drupal-php:7.0-1.0.0 # Allowed: 7.0, 5.6. Specify build number to ensure each team member is using the same version of the container.
environment:
PHP_SITE_NAME: dev
PHP_HOST_NAME: localhost:8000
PHP_DOCROOT: web # Relative path inside the /var/www/html/ directory.
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
PHP_XDEBUG_ENABLED: 1
# PHP_XDEBUG_AUTOSTART: 1
PHP_XDEBUG_REMOTE_CONNECT_BACK: 0 # This is needed to respect remote.host setting bellow
PHP_XDEBUG_REMOTE_HOST: "10.254.254.254" # You will also need to 'sudo ifconfig lo0 alias 10.254.254.254'
volumes:
- ./:/var/www/html
nginx:
image: wodby/drupal-nginx
environment:
NGINX_SERVER_NAME: localhost
NGINX_UPSTREAM_NAME: php
NGINX_DOCROOT: web # Relative path inside the /var/www/html/ directory.
DRUPAL_VERSION: 8 # Allowed: 7, 8.
volumes_from:
- php
ports:
- "80:80"
mailhog:
image: mailhog/mailhog
ports:
- "8002:8025"
selenium:
container_name: selenium
image: selenium/standalone-firefox:2.53.1
node-php-composer:
image: savaslabs/node-php-composer:1.2
ports:
- "3050:3050"
- "3001:3001"
volumes_from:
- php
volumes:
mysql-data:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment