Created
April 19, 2017 09:58
-
-
Save MatthieuScarset/a6e87db9d1d2d164dbcfcaea694cf987 to your computer and use it in GitHub Desktop.
Drupal Composer Docker Compose file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "2" | |
services: | |
mariadb: | |
image: wodby/mariadb:10.1-2.0.0 | |
environment: | |
MYSQL_ROOT_PASSWORD: password | |
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: | |
# - ./mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here. | |
# - /path/to/mariadb/data/on/host:/var/lib/mysql # I want to manage volumes manually. | |
php: | |
image: wodby/drupal-php:7.0-2.0.0 | |
# image: wodby/drupal-php:7.1-2.0.0 | |
# image: wodby/drupal-php:5.6-2.0.0 | |
# image: wodby/drupal-php:5.3-2.0.0 | |
environment: | |
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025 | |
# PHP_XDEBUG: 1 | |
# PHP_XDEBUG_DEFAULT_ENABLE: 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 | |
# - d4d-unison-sync:/var/www/html:rw # Replace volume to this to use docker-sync for macOS users | |
nginx: | |
image: wodby/drupal-nginx:8-1.10-2.0.0 | |
# image: wodby/drupal-nginx:7-1.10-2.0.0 | |
# image: wodby/drupal-nginx:6-1.10-2.0.0 | |
restart: unless-stopped | |
depends_on: | |
- php | |
environment: | |
NGINX_BACKEND_HOST: php | |
NGINX_SERVER_ROOT: /var/www/html/web | |
volumes: | |
- ./:/var/www/html | |
labels: | |
- 'traefik.backend=nginx' | |
- 'traefik.port=80' | |
- 'traefik.frontend.rule=Host:drupal.docker.localhost' | |
# varnish: | |
# image: wodby/drupal-varnish:4.1-2.0.0 | |
# depends_on: | |
# - nginx | |
# environment: | |
# VARNISH_SECRET: secret | |
# VARNISH_BACKEND_HOST: nginx | |
# VARNISH_BACKEND_PORT: 80 | |
# labels: | |
# - 'traefik.backend=varnish' | |
# - 'traefik.port=6081' | |
# - 'traefik.frontend.rule=Host:varnish.drupal.docker.localhost' | |
redis: | |
image: wodby/redis:3.2-2.0.1 | |
pma: | |
image: phpmyadmin/phpmyadmin | |
environment: | |
PMA_HOST: mariadb | |
PMA_USER: drupal | |
PMA_PASSWORD: drupal | |
PHP_UPLOAD_MAX_FILESIZE: 1G | |
PHP_MAX_INPUT_VARS: 1G | |
labels: | |
- 'traefik.backend=pma' | |
- 'traefik.port=80' | |
- 'traefik.frontend.rule=Host:pma.drupal.docker.localhost' | |
solr: | |
image: wodby/drupal-solr:8-6.4-2.0.0 | |
# image: wodby/drupal-solr:8-6.3-2.0.0 | |
# image: wodby/drupal-solr:7-5.5-2.0.0 | |
environment: | |
SOLR_HEAP: 1024m | |
labels: | |
- 'traefik.backend=solr' | |
- 'traefik.port=8983' | |
- 'traefik.frontend.rule=Host:solr.drupal.docker.localhost' | |
mailhog: | |
image: mailhog/mailhog | |
labels: | |
- 'traefik.backend=mailhog' | |
- 'traefik.port=8025' | |
- 'traefik.frontend.rule=Host:mailhog.drupal.docker.localhost' | |
# node: | |
# image: node:7-alpine | |
# working_dir: /app | |
# labels: | |
# - 'traefik.backend=node' | |
# - 'traefik.port=3000' | |
# - 'traefik.frontend.rule=Host:front.drupal.docker.localhost' | |
# expose: | |
# - "3000" | |
# volumes: | |
# - ./path/to/your/single-page-app:/app | |
# command: sh -c 'npm install && npm run start' | |
# memcached: | |
# image: memcached:1.4-alpine | |
traefik: | |
image: traefik | |
restart: unless-stopped | |
command: -c /dev/null --web --docker --logLevel=INFO | |
ports: | |
- '8000:80' | |
- '8080:8080' | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
# Docker-sync for macOS users | |
#volumes: | |
# d4d-unison-sync: | |
# external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment