-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
111 lines (104 loc) · 3.03 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
version: "3"
services:
mariadb:
image: wodby/mariadb:10.1-2.3.3
container_name: "headless-drupal_mariadb"
stop_grace_period: 30s
environment:
MYSQL_ROOT_PASSWORD: drupal
MYSQL_DATABASE: drupal
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
# ports:
# - "3307:3306"
volumes:
# - ./mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here.
- ./.persist/mysql:/var/lib/mysql:delegated # I want to manage volumes manually.
networks:
- default
php:
image: wodby/drupal-php:7.2-dev
container_name: "headless-drupal_php"
environment:
DOCKER_LOCAL: 1
D4D_HOSTNAME: headless-drupal.localhost
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
PHP_XDEBUG: 1
PHP_XDEBUG_DEFAULT_ENABLE: 1
PHP_XDEBUG_REMOTE_CONNECT_BACK: 0 # This is needed to respect remote.host setting bellow
PHP_XDEBUG_REMOTE_HOST: host.docker.internal
PHP_IDE_CONFIG: "serverName=drupal" # Needed for xdebug for drush commands.
SMTP_HOST: "mailhog"
SMTP_PORT: 1025
SMTP_USERNAME: ""
SMTP_PASSWORD: ""
SMTP_FROM: "[email protected]"
volumes:
- ./:/var/www/html:cached
- ./.persist/public:/var/www/html/docroot/sites/default/files:delegated
- ./.persist/private:/private:delegated
tmpfs: /tmp
networks:
- default
nginx:
image: wodby/nginx:1.17-5.5.0
container_name: "headless-drupal_nginx"
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/docroot
NGINX_VHOST_PRESET: drupal8
volumes:
# - ./docker/nginx/drupal8.conf.tmpl:/etc/gotpl/presets/drupal8.conf.tmpl
- ./:/var/www/html:cached
- ./.persist/public:/var/www/html/docroot/sites/default/files:delegated
tmpfs: /tmp
networks:
- default
- proxy
labels:
- 'traefik.docker.network=proxy'
- 'traefik.port=80'
- 'traefik.frontend.rule=Host:cms.headless-drupal.localhost'
mailhog:
image: mailhog/mailhog
container_name: "headless-drupal_mailhog"
networks:
- default
- proxy
labels:
- 'traefik.docker.network=proxy'
- 'traefik.port=8025'
- 'traefik.frontend.rule=Host:mailhog.headless-drupal.localhost'
redis:
container_name: "headless-drupal_redis"
image: wodby/redis:3.2-2.1.0
networks:
- default
node:
image: node:10
container_name: "headless-drupal_node"
volumes:
- ./:/app:delegated
working_dir: /app
environment:
DOCKER_LOCAL: 1
command: './node_modules/.bin/webpack -wd'
networks:
- default
- proxy
labels:
- 'traefik.docker.network=proxy'
- 'traefik.port=3000'
- 'traefik.frontend.rule=Host:headless-drupal.localhost'
networks:
proxy:
external: true