-
jurgenhaas authoredjurgenhaas authored
docker-compose.yml.twig 5.82 KiB
version: '3'
services:
mariadb:
image: 'wodby/mariadb:10.2'
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.13") }}'
{% 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 %}