forked from drupal-composer/drupal-project
-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yaml
75 lines (69 loc) · 1.8 KB
/
docker-compose.yaml
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
version: "2.3"
services:
mariadb:
image: wodby/mariadb:10.2-3.0.2
env_file: ./.env
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'true'
MYSQL_DATABASE: ${DATABASE_NAME}
MYSQL_USER: ${DATABASE_USER}
MYSQL_PASSWORD: ${DATABASE_PASSWORD}
volumes:
- mysqldata:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
php:
image: wodby/drupal-php:7.0-2.4.3
env_file: ./.env
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
DB_HOST: ${DATABASE_HOST}
DB_USER: ${DATABASE_USER}
DB_PASSWORD: ${DATABASE_PASSWORD}
DB_NAME: ${DATABASE_NAME}
DB_DRIVER: mysql
volumes:
- ./shell:/var/www/shell:cached
- ./:/var/www/html:cached
depends_on:
- mariadb
healthcheck:
test: bash -c "[ -f /var/www/html/web ]"
timeout: 5s
retries: 100
nginx:
image: wodby/drupal-nginx:8-1.13-2.4.2
env_file: ./.env
depends_on:
- php
environment:
NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off"
NGINX_ERROR_LOG_LEVEL: debug
NGINX_BACKEND_HOST: php
NGINX_SERVER_ROOT: /var/www/html/web
volumes:
- ./:/var/www/html:cached
labels:
- 'traefik.backend=nginx'
- 'traefik.port=80'
- 'traefik.frontend.rule=Host:${HOST_NAME}'
mailhog:
image: mailhog/mailhog
env_file: ./.env
labels:
- 'traefik.backend=mailhog'
- 'traefik.port=8025'
- 'traefik.frontend.rule=Host:mailhog.${HOST_NAME}'
traefik:
image: traefik
env_file: ./.env
command: -c /dev/null --web --docker --logLevel=INFO
ports:
- '${HOST_PORT}:80'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
volumes:
mysqldata:
driver: "local"