-
jurgenhaas authoredjurgenhaas authored
docker-compose.yml.twig 6.81 KiB
version: '3'
services:
mariadb:
image: 'wodby/mariadb:10.3'
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: drupal
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
php:
image: 'wodby/drupal-php:{{ php.version }}-dev'
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
DB_HOST: mariadb
DB_USER: drupal
DB_PASSWORD: drupal
DB_NAME: drupal
DB_DRIVER: mysql
{% if php.xdebug %}
PHP_XDEBUG: 1
PHP_XDEBUG_DEFAULT_ENABLE: 1
PHP_XDEBUG_REMOTE_AUTOSTART: 1
PHP_XDEBUG_REMOTE_HOST: {{ docker0.ip }}
PHP_IDE_CONFIG: serverName=Docker
PHP_XDEBUG_REMOTE_CONNECT_BACK: 1
DRUSH_ALLOW_XDEBUG: 1
{% if webgrind.enable %}
PHP_XDEBUG_PROFILER_ENABLE: 1
PHP_XDEBUG_PROFILER_ENABLE_TRIGGER: 1
PHP_XDEBUG_PROFILER_ENABLE_TRIGGER_VALUE: 1
PHP_XDEBUG_PROFILER_OUTPUT_DIR: /mnt/files/xdebug/profiler
PHP_XDEBUG_TRACE_OUTPUT_DIR: /mnt/files/xdebug/traces
{% endif %}
{% endif %}
{% if blackfire.enable %}
PHP_BLACKFIRE: 1
{% endif %}
{% if php.ssh %}
SSH_AUTH_SOCK: /ssh-agent
{% endif %}
volumes:
- ./:/var/www/html
- ./drush:/etc/drush
{% if php.ssh %}
- $SSH_AUTH_SOCK:/ssh-agent
{% endif %}
{% if webgrind.enable %}
- files:/mnt/files
{% endif %}
{{ webserver.type }}:
{% if webserver.type == 'nginx' %}
image: 'wodby/drupal-nginx:{{ drupal.version }}-{{ webserver.version|default("1.15") }}'
{% elseif webserver.type == 'apache' %}
image: 'wodby/php-apache:2.4'
{% endif %}
depends_on:
- php
environment:
{% if webserver.type == 'nginx' %}
{% if live is defined and live.uri is defined %}
NGINX_DRUPAL_FILE_PROXY_URL: '{{ live.uri }}'
{% endif %}
NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: 'off'
NGINX_ERROR_LOG_LEVEL: debug
{% elseif webserver.type == 'apache' %}
APACHE_LOG_LEVEL: debug
{% endif %}
{{ webserver.type|upper }}_BACKEND_HOST: php
{{ webserver.type|upper }}_SERVER_ROOT: /var/www/html/{{ webRoot }}
volumes:
- ./:/var/www/html
labels:
traefik.backend: '{{ projectname }}_{{ webserver.type }}_1'
traefik.port: '80'
traefik.frontend.rule: 'Host:{{ projectname }}.docker.localhost'
{% if varnish.enable %}
varnish:
image: 'wodby/drupal-varnish:4.1'
depends_on:
- {{ webserver.type }}
environment:
VARNISH_SECRET: secret
VARNISH_BACKEND_HOST: {{ webserver.type }}
VARNISH_BACKEND_PORT: 80
labels:
traefik.backend: '{{ projectname }}_varnish_1'
traefik.port: '6081'
traefik.frontend.rule: 'Host:varnish.{{ projectname }}.docker.localhost'
{% endif %}
redis:
image: 'wodby/redis:{{ redis.version }}'
{% if dbbrowser.type == 'adminer' %}
adminer:
image: 'wodby/adminer:{{ dbbrowser.version|default("4.6") }}'
environment:
ADMINER_SALT: adminer-salt
labels:
traefik.backend: '{{ projectname }}_adminer_1'
traefik.port: '9000'
traefik.frontend.rule: 'Host:adminer.{{ projectname }}.docker.localhost'
{% elseif dbbrowser.type == 'pma' %}
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: '{{ projectname }}_pma_1'
traefik.port: '80'
traefik.frontend.rule: 'Host:pma.{{ projectname }}.docker.localhost'
{% endif %}
{% if solr.enable %}
solr:
image: 'wodby/drupal-solr:{{ drupal.version }}-{{ solr.version }}'
environment:
SOLR_HEAP: 1024m
labels:
traefik.backend: '{{ projectname }}_solr_1'
traefik.port: '8983'
traefik.frontend.rule: 'Host:solr.{{ projectname }}.docker.localhost'
{% endif %}
mailhog:
image: 'mailhog/mailhog'
labels:
traefik.backend: '{{ projectname }}_mailhog_1'
traefik.port: '8025'
traefik.frontend.rule: 'Host:mailhog.{{ projectname }}.docker.localhost'
{% if node.enable %}
nodejs:
image: 'wodby/drupal-node:1.0'
environment:
NODE_SERVICE_KEY: '{{ node.key }}'
labels:
traefik.backend: 'nodejs'
traefik.port: '8080'
traefik.frontend.rule: 'Host:nodejs.{{ projectname }}.docker.localhost'
volumes:
- ./{{ node.path }}:/app
command: sh -c 'npm install && npm run start'
node:
image: 'node:alpine'
working_dir: /app
labels:
traefik.backend: '{{ projectname }}_node_1'
traefik.port: '3000'
traefik.frontend.rule: 'Host:front.{{ projectname }}.docker.localhost'
expose:
- '3000'
volumes:
- ./{{ node.path }}:/app
command: sh -c 'npm install && npm run start'
{% endif %}
{% if memcached.enable %}
memcached:
image: 'wodby/memcached:1.5'
{% endif %}
{% if rsyslog.enable %}
rsyslog:
image: 'wodby/rsyslog'
{% endif %}
{% if athenapdf.enable %}
athenapdf:
image: 'arachnysdocker/athenapdf-service'
environment:
WEAVER_AUTH_KEY: '{{ athenapdf.key }}'
WEAVER_ATHENA_CMD: 'athenapdf -S'
WEAVER_MAX_WORKERS: 10
WEAVER_MAX_CONVERSION_QUEUE: 50
WEAVER_WORKER_TIMEOUT: 90
WEAVER_CONVERSION_FALLBACK: false
{% endif %}
{% if blackfire.enable %}
blackfire:
image: 'blackfire/blackfire'
environment:
BLACKFIRE_SERVER_ID: '{{ blackfire.id }}'
BLACKFIRE_SERVER_TOKEN: '{{ blackfire.token }}'
{% endif %}
{% if webgrind.enable %}
webgrind:
# add XDEBUG_PROFILE=1 to your request to profile that
image: 'wodby/webgrind:1.5'
environment:
WEBGRIND_PROFILER_DIR: '/mnt/files/xdebug/profiler'
labels:
traefik.backend: '{{ projectname }}_webgrind_1'
traefik.port: '8080'
traefik.frontend.rule: 'Host:webgrind.{{ projectname }}.docker.localhost'
volumes:
- files:/mnt/files
{% endif %}
hub:
image: 'elgalu/selenium'
volumes:
- /dev/shm:/dev/shm
privileged: true
environment:
- SELENIUM_HUB_HOST: 'hub'
- SELENIUM_HUB_PORT: '4444'
- GRID: 'true'
- CHROME: 'false'
- FIREFOX: 'false'
depends_on:
- php
chrome:
image: 'elgalu/selenium'
depends_on:
- hub
volumes:
- /dev/shm:/dev/shm
privileged: true
environment:
- NOVNC: 'true'
- SELENIUM_HUB_HOST: 'hub'
- SELENIUM_HUB_PORT: '4444'
- SELENIUM_NODE_HOST: '{{ docker0.ip }}'
- SCREEN_WIDTH: '1300'
- SCREEN_HEIGHT: '999'
- VIDEO: 'false'
- GRID: 'false'
- CHROME: 'true'
- FIREFOX: 'false'
#ports:
# VNC: See what's going on by connecting your VNC client to 0.0.0.0:5900
#- 5900:25900
# noVNC: See what's going on by hitting http://0.0.0.0:6080 in your browser
# Important: http://127.0.0.1:6081 works but http://localhost:6081 doesn't
#- 6080:26080
networks:
default:
external:
name: traefik_{{ projectname }}