-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
153 lines (138 loc) · 4.53 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
version: '2.1'
services:
mariadb:
image: wodby/mariadb:$MARIADB_TAG
container_name: "${PROJECT_NAME}_mariadb"
stop_grace_period: 30s
environment:
# See all available mariadb variables at https://github.com/wodby/mariadb.
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
MYSQL_DATABASE: $DB_NAME
MYSQL_USER: $DB_USER
MYSQL_PASSWORD: $DB_PASSWORD
volumes:
# - ./mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here.
- project-db-data:/var/lib/mysql # I want to manage volumes manually.
php:
image: wodby/drupal-php:$PHP_TAG
container_name: "${PROJECT_NAME}_php"
environment:
# See all available PHP variables at https://github.com/wodby/drupal-php.
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
DB_HOST: $DB_HOST
DB_USER: $DB_USER
DB_PASSWORD: $DB_PASSWORD
DB_NAME: $DB_NAME
DB_DRIVER: $DB_DRIVER
PHP_TIMEZONE: Europe/London
volumes:
# - ./:/var/www/html
# For macOS users (https://wodby.com/stacks/drupal/docs/local/docker-for-mac/)
- ./:/var/www/html:cached # User-guided caching
# - docker-sync:/var/www/html # Docker-sync
nginx:
image: wodby/drupal-nginx:$NGINX_TAG
container_name: "${PROJECT_NAME}_nginx"
depends_on:
- php
environment:
# See all available NGINX variables at https://github.com/wodby/drupal-nginx.
NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off"
NGINX_ERROR_LOG_LEVEL: debug
NGINX_BACKEND_HOST: php
NGINX_SERVER_ROOT: "${NGINX_SERVER_ROOT}"
# NGINX_DRUPAL_FILE_PROXY_URL: http://example.com
volumes:
# - ./:/var/www/html
# For macOS users (https://wodby.com/stacks/drupal/docs/local/docker-for-mac/)
- ./:/var/www/html:cached # User-guided caching
# - docker-sync:/var/www/html # Docker-sync
labels:
- 'traefik.backend=nginx'
- 'traefik.port=80'
- 'traefik.frontend.rule=Host:${PROJECT_BASE_URL}'
redis:
image: wodby/redis:$REDIS_TAG
container_name: "${PROJECT_NAME}_redis"
memcached:
image: wodby/memcached:$MEMCACHED_TAG
container_name: "${PROJECT_NAME}_memcached"
mailhog:
image: mailhog/mailhog
container_name: "${PROJECT_NAME}_mailhog"
labels:
- 'traefik.backend=mailhog'
- 'traefik.port=8025'
- "traefik.frontend.rule=Host:mailhog.${COMPOSE_PROJECT_NAME}.docker.localhost"
# varnish:
# image: wodby/drupal-varnish:$VARNISH_TAG
# container_name: "${PROJECT_NAME}_varnish"
# depends_on:
# - nginx
# environment:
# VARNISH_SECRET: secret
# VARNISH_BACKEND_HOST: nginx
# VARNISH_BACKEND_PORT: 80
# labels:
# - 'traefik.backend=varnish'
# - 'traefik.port=6081'
# - 'traefik.frontend.rule=Host:varnish.${PROJECT_BASE_URL}'
# adminer:
# image: wodby/adminer:$ADMINER_TAG
# container_name: "${PROJECT_NAME}_adminer"
# environment:
# ADMINER_SALT: adminer-salt
# labels:
# - 'traefik.backend=adminer'
# - 'traefik.port=9000'
# - 'traefik.frontend.rule=Host:adminer.${PROJECT_BASE_URL}'
# solr:
# image: wodby/drupal-solr:$SOLR_TAG
# container_name: "${PROJECT_NAME}_solr"
# environment:
# SOLR_HEAP: 1024m
# labels:
# - 'traefik.backend=solr'
# - 'traefik.port=8983'
# - 'traefik.frontend.rule=Host:solr.${PROJECT_BASE_URL}'
# elasticsearch:
# image: wodby/elasticsearch:$ELASTICSEARCH_TAG
# environment:
# ES_JAVA_OPTS: "-Xms500m -Xmx500m"
# ulimits:
# memlock:
# soft: -1
# hard: -1
# kibana:
# image: wodby/kibana:$KIBANA_TAG
# depends_on:
# - elasticsearch
# labels:
# - 'traefik.backend=kibana'
# - 'traefik.port=5601'
# - 'traefik.frontend.rule=Host:kibana.php.docker.localhost'
portainer:
image: portainer/portainer
container_name: "${PROJECT_NAME}_portainer"
command: --no-auth -H unix:///var/run/docker.sock
volumes:
- /var/run/docker.sock:/var/run/docker.sock
labels:
- 'traefik.backend=portainer'
- 'traefik.port=9000'
- 'traefik.frontend.rule=Host:portainer.${PROJECT_BASE_URL}'
traefik:
image: traefik
container_name: "${PROJECT_NAME}_traefik"
command: -c /dev/null --web --docker --logLevel=INFO
ports:
- '80:80'
- '8080:8080' # Dashboard
volumes:
- /var/run/docker.sock:/var/run/docker.sock
volumes:
# Docker-sync for macOS users
# docker-sync:
# external: true
project-db-data:
name: ${PROJECT_NAME}-data