diff --git a/src/Handler.php b/src/Handler.php index f0e71cfe8eda1bd4e3123a4f9e97e8d8478fbe5c..bc9eb8e1756595ad0467d0ae8e85cfb9f557aa31 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -200,8 +200,9 @@ class Handler { 'version' => '7.0',# 5.3|5.6|7.1 'xdebug' => 1, ], - 'nginx' => [ - 'version' => '1.10', + 'webserver' => [ + 'type' => 'nginx',# apache + 'version' => '1.13', ], 'varnish' => [ 'enable' => 0, @@ -211,6 +212,18 @@ class Handler { ], 'node' => [ 'enable' => 0, + 'key' => '', + 'path' => '', + ], + 'memcached' => [ + 'enable' => 0, + ], + 'rsyslog' => [ + 'enable' => 0, + ], + 'athenapdf' => [ + 'enable' => 0, + 'key' => '', ], ]; return $options; diff --git a/templates/docker-compose.yml.twig b/templates/docker-compose.yml.twig index 54da4bc26990262af051355b5bce753cc42dcbaa..9cdbdef7038ff235f58d874bf64cc19966771ee2 100644 --- a/templates/docker-compose.yml.twig +++ b/templates/docker-compose.yml.twig @@ -2,7 +2,7 @@ version: "2" services: mariadb: - image: wodby/mariadb:10.1-2.0.0 + image: 'wodby/mariadb:10.1-2.3.3' environment: MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: drupal @@ -10,7 +10,7 @@ services: MYSQL_PASSWORD: drupal php: - image: wodby/drupal-php:{{ php.version }}-2.0.0 + image: 'wodby/drupal-php:{{ php.version }}-2.4.3' environment: PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025 {% if php.xdebug %} @@ -27,28 +27,32 @@ services: - ./drush:/etc/drush - $SSH_AUTH_SOCK:/ssh-agent - nginx: - image: wodby/drupal-nginx:{{ drupal.version }}-{{ nginx.version }} + {{ webserver.type }}: +{% if webserver.type == 'nginx' %} + image: 'wodby/drupal-nginx:{{ drupal.version }}-{{ webserver.version }}-2.4.2' +{% elseif webserver.type == 'apache' %} + image: 'wodby/drupal-apache:2.4-1.0.2' +{% endif %} depends_on: - php environment: - NGINX_BACKEND_HOST: php - NGINX_SERVER_ROOT: /var/www/html/{{ webRoot }} + {{ webserver.type|upper }}_BACKEND_HOST: php + {{ webserver.type|upper }}_SERVER_ROOT: /var/www/html/{{ webRoot }} volumes: - ./:/var/www/html labels: - - 'traefik.backend={{ projectname }}_nginx_1' + - '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-2.0.0 + image: 'wodby/drupal-varnish:4.1-2.1.2' depends_on: - - nginx + - {{ webserver.type }} environment: VARNISH_SECRET: secret - VARNISH_BACKEND_HOST: nginx + VARNISH_BACKEND_HOST: {{ webserver.type }} VARNISH_BACKEND_PORT: 80 labels: - 'traefik.backend={{ projectname }}_varnish_1' @@ -57,10 +61,10 @@ services: {% endif %} redis: - image: wodby/redis:3.2-2.0.1 + image: 'wodby/redis:3.2-2.1.2' pma: - image: phpmyadmin/phpmyadmin + image: 'phpmyadmin/phpmyadmin' environment: PMA_HOST: mariadb PMA_USER: drupal @@ -74,7 +78,7 @@ services: {% if solr.enable %} solr: - image: wodby/drupal-solr:8-6.4-2.0.0 + image: 'wodby/drupal-solr:{{ drupal.version }}-6.6-2.2.0' environment: SOLR_HEAP: 1024m labels: @@ -84,15 +88,27 @@ services: {% endif %} mailhog: - image: mailhog/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-1.0.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:7-alpine + image: 'node:alpine' working_dir: /app labels: - 'traefik.backend={{ projectname }}_node_1' @@ -101,6 +117,28 @@ services: expose: - "3000" volumes: - - ./path/to/your/single-page-app:/app + - ./{{ node.path }}:/app command: sh -c 'npm install && npm run start' {% endif %} + +{% if memcached.enable %} + memcached: + image: 'wodby/memcached:1.4-2.0.0' +{% 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 %}