Newer
Older
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
php:
image: wodby/drupal-php:{{ php.version }}-2.0.0
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
{% if php.debug %}
PHP_XDEBUG: 1
PHP_XDEBUG_DEFAULT_ENABLE: 1
{% endif %}
volumes:
- ./:/var/www/html

jurgenhaas
committed
- ./drush:/etc/drush

jurgenhaas
committed
image: wodby/drupal-nginx:{{ drupal.version }}-{{ nginx.version }}
restart: unless-stopped
depends_on:
- php
environment:
NGINX_BACKEND_HOST: php
volumes:
- ./:/var/www/html
labels:
- 'traefik.backend=nginx'
- 'traefik.port=80'

jurgenhaas
committed
- 'traefik.frontend.rule=Host:{{ projectname }}.docker.localhost'
{% if varnish.enable %}
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'

jurgenhaas
committed
- 'traefik.frontend.rule=Host:varnish.{{ projectname }}.docker.localhost'
{% endif %}
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'

jurgenhaas
committed
- 'traefik.frontend.rule=Host:pma.{{ projectname }}.docker.localhost'
{% if solr.enable %}
solr:
image: wodby/drupal-solr:8-6.4-2.0.0
environment:
SOLR_HEAP: 1024m
labels:
- 'traefik.backend=solr'
- 'traefik.port=8983'

jurgenhaas
committed
- 'traefik.frontend.rule=Host:solr.{{ projectname }}.docker.localhost'
{% endif %}
mailhog:
image: mailhog/mailhog
labels:
- 'traefik.backend=mailhog'
- 'traefik.port=8025'

jurgenhaas
committed
- 'traefik.frontend.rule=Host:mailhog.{{ projectname }}.docker.localhost'
{% if node.enable %}
node:
image: node:7-alpine
working_dir: /app
labels:
- 'traefik.backend=node'
- 'traefik.port=3000'

jurgenhaas
committed
- 'traefik.frontend.rule=Host:front.{{ projectname }}.docker.localhost'
expose:
- "3000"
volumes:
- ./path/to/your/single-page-app:/app
command: sh -c 'npm install && npm run start'
{% endif %}