This repository has been archived by the owner on Jul 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
131 lines (122 loc) · 4.91 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
version: "3"
services:
database:
image: ${DB_IMAGE:-wodby/mariadb:10.2-3.1.3}
container_name: "${COMPOSE_PROJECT_NAME:-my_project}_database"
stop_grace_period: 30s
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-password}
MYSQL_DATABASE: ${DB_NAME:-drupal}
MYSQL_USER: ${DB_USER:-drupal}
MYSQL_PASSWORD: ${DB_PASSWORD:-password}
POSTGRES_PASSWORD: ${DB_PASSWORD:-password}
POSTGRES_DB: ${DB_NAME:-drupal}
POSTGRES_USER: ${DB_USER:-drupal}
volumes:
# - ./mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here.
- db_data:/var/lib/mysql # I want to manage volumes manually.
# - ./postgres-init:/docker-entrypoint-initdb.d # Place init file(s) here.
# - /path/to/postgres/data/on/host:/var/lib/postgresql/data # I want to manage volumes manually.
# If you would like to access to the database on your localhost add this
# to your docker-composer.override.yml and expose the database port.
# networks:
# - web
# - default
php:
image: ${PHP_IMAGE:-wodby/drupal-php:7.1-dev-4.5.0}
container_name: "${COMPOSE_PROJECT_NAME:-my_project}_php"
environment:
DB_HOST: ${DB_HOST:-database}
DB_USER: ${DB_USER:-drupal}
DB_PASSWORD: ${DB_PASSWORD-password}
DB_NAME: ${DB_NAME:-drupal}
DB_DRIVER: ${DB_DRIVER:-mysql}
COMPOSER_AUTH: ${COMPOSER_AUTH:-}
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
PHP_XDEBUG_IDEKEY: PHPSTORM
PHP_XDEBUG_MAX_NESTING_LEVEL: 400
# Without this CLI command debugging (Drush, PHPUnit, etc.) does not work.
# https://www.jetbrains.com/help/phpstorm/zero-configuration-debugging.html#d478010e708
PHP_IDE_CONFIG: serverName=docker
# https://docs.docker.com/docker-for-mac/networking/#there-is-no-docker0-bridge-on-macos#i-want-to-connect-from-a-container-to-a-service-on-the-host
PHP_XDEBUG_REMOTE_HOST: docker.for.mac.localhost
## Read instructions at https://wodby.com/stacks/drupal/docs/local/xdebug/
# PHP_XDEBUG_REMOTE_HOST: 172.17.0.1 # Linux
# PHP_XDEBUG_REMOTE_HOST: 10.0.75.1 # Windows
SIMPLETEST_BASE_URL: http://webserver
SIMPLETEST_DB: ${DB_DRIVER:-mysql}://${DB_USER:-drupal}:${DB_PASSWORD-password}@${DB_HOST:-database}/${DB_NAME:-drupal}
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", null, "http://webdriver:4444/wd/hub"]'
# Force all BrowserTestBase (including legacy JavascriptTestBase) tests to use webdriver:
# MINK_DRIVER_CLASS: 'Drupal\FunctionalJavascriptTests\DrupalSelenium2Driver'
volumes:
# Using cached for MacOS.
# https://docs.docker.com/docker-for-mac/osxfs-caching/#tuning-with-consistent-cached-and-delegated-configurations
- ./:/var/www/html:cached
- composer_data:/home/wodby/.composer
## For Xdebug profiler files
# - files:/mnt/files
webserver:
image: ${WEBSERVER_IMAGE:-wodby/php-apache:2.4-3.0.5}
container_name: "${COMPOSE_PROJECT_NAME:-my_project}_webserver"
depends_on:
- php
environment:
APACHE_LOG_LEVEL: debug
APACHE_BACKEND_HOST: php
APACHE_SERVER_ROOT: /var/www/html/web
NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off"
NGINX_ERROR_LOG_LEVEL: debug
NGINX_BACKEND_HOST: php
NGINX_SERVER_ROOT: /var/www/html/web
# NGINX_DRUPAL_FILE_PROXY_URL: http://example.com
volumes:
# Using cached for MacOS.
# https://docs.docker.com/docker-for-mac/osxfs-caching/#tuning-with-consistent-cached-and-delegated-configurations
- ./:/var/www/html:cached
labels:
- 'traefik.backend=${COMPOSE_PROJECT_NAME:-my_project}_webserver'
- 'traefik.enable=true'
- 'traefik.port=80'
- 'traefik.docker.network=web'
- 'traefik.frontend.rule=Host:${PROJECT_BASE_URL:-my-project.l}'
networks:
- web
- default
mailhog:
image: mailhog/mailhog
container_name: "${COMPOSE_PROJECT_NAME:-my_project}_mailhog"
labels:
- 'traefik.backend=${COMPOSE_PROJECT_NAME:-my_project}_mailhog'
- 'traefik.enable=true'
- 'traefik.port=8025'
- 'traefik.docker.network=web'
- 'traefik.frontend.rule=Host:mailhog.${PROJECT_BASE_URL:-my-project.l}'
networks:
- web
- default
phpcs:
image: mxr576/docker-phpcs
container_name: "${COMPOSE_PROJECT_NAME:-my_project}_phpcs"
volumes:
- .:/data:cached
depends_on:
- php
redis:
image: ${REDIS_IMAGE:-wodby/redis:4.0-2.1.5}
container_name: "${COMPOSE_PROJECT_NAME:-my_project}_redis"
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD-redis}
webdriver:
image: selenium/standalone-chrome:3
# Unfortunatelly its seems this image is not working at this moment.
# https://www.drupal.org/project/drupalci_environments/issues/2978243
# image: drupalci/webdriver-chromedriver:dev
volumes:
db_data:
composer_data:
networks:
web:
external: true