-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
116 lines (106 loc) · 3.54 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
version: "3"
services:
php:
image: wodby/drupal-php:$PHP_TAG
container_name: "${PROJECT_NAME}_php"
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
# PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S opensmtpd:25
DB_HOST: $DB_HOST
DB_PORT: $DB_PORT
DB_USER: $DB_USER
DB_PASSWORD: $DB_PASSWORD
DB_NAME: $DB_NAME
DB_DRIVER: $DB_DRIVER
PHP_FPM_USER: wodby
PHP_FPM_GROUP: wodby
COLUMNS: 80 # Set 80 columns for docker exec -it.
# PHP_XDEBUG: 1
# PHP_XDEBUG_DEFAULT_ENABLE: 1
# PHP_XDEBUG_REMOTE_HOST: host.docker.internal
# PHP_XDEBUG_REMOTE_PORT: 9123
# PHP_XDEBUG_REMOTE_CONNECT_BACK: 0
volumes:
- ./:/var/www/html:cached
## Alternative for macOS users: docker-sync https://wodby.com/docs/stacks/drupal/local#docker-for-mac
# - docker-sync:/var/www/html
## For XHProf and Xdebug profiler traces
# - files:/mnt/files
nginx:
image: wodby/nginx:$NGINX_TAG
container_name: "${PROJECT_NAME}_nginx"
depends_on:
- php
environment:
NGINX_STATIC_OPEN_FILE_CACHE: "off"
NGINX_ERROR_LOG_LEVEL: debug
NGINX_BACKEND_HOST: php
NGINX_SERVER_ROOT: /var/www/html/web
NGINX_VHOST_PRESET: $NGINX_VHOST_PRESET
NGINX_DRUPAL_FILE_PROXY_URL: http://example.com
volumes:
- ./:/var/www/html:cached
## Alternative for macOS users: docker-sync https://wodby.com/docs/stacks/drupal/local#docker-for-mac
# - docker-sync:/var/www/html
labels:
- "traefik.http.routers.${PROJECT_NAME}_nginx.rule=Host(`${PROJECT_BASE_URL}`)"
postgres:
image: wodby/postgres:$POSTGRES_TAG
container_name: "${PROJECT_NAME}_postgres"
stop_grace_period: 30s
environment:
POSTGRES_PASSWORD: $DB_PASSWORD
POSTGRES_DB: $DB_NAME
POSTGRES_USER: $DB_USER
volumes:
- ./postgres-init:/docker-entrypoint-initdb.d # Place init file(s) here.
- $DB_DATA_DIR:/var/lib/postgresql/data # Use bind mount
solr:
image: wodby/solr:$SOLR_TAG
container_name: "${PROJECT_NAME}_solr"
environment:
SOLR_DEFAULT_CONFIG_SET: $SOLR_CONFIG_SET
SOLR_HEAP: 1024m
labels:
- "traefik.http.routers.${PROJECT_NAME}_solr.rule=Host(`solr.${PROJECT_BASE_URL}`)"
volumes:
- $SOLR_DATA_DIR:/opt/solr/server/solr
varnish:
image: wodby/varnish:$VARNISH_TAG
container_name: "${PROJECT_NAME}_varnish"
depends_on:
- nginx
environment:
VARNISH_SECRET: secret
VARNISH_BACKEND_HOST: nginx
VARNISH_BACKEND_PORT: 80
VARNISH_CONFIG_PRESET: drupal
VARNISH_ALLOW_UNRESTRICTED_PURGE: 1
labels:
- "traefik.http.services.${PROJECT_NAME}_varnish.loadbalancer.server.port=6081"
- "traefik.http.routers.${PROJECT_NAME}_varnish.rule=Host(`varnish.${PROJECT_BASE_URL}`)"
redis:
container_name: "${PROJECT_NAME}_redis"
image: wodby/redis:$REDIS_TAG
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.http.routers.${PROJECT_NAME}_portainer.rule=Host(`portainer.${PROJECT_BASE_URL}`)"
traefik:
image: traefik:v2.9.1
container_name: "${PROJECT_NAME}_traefik"
command: --api.insecure=true --providers.docker
ports:
- '${PROJECT_PORT}:80'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
#volumes:
## Docker-sync for macOS users
# docker-sync:
# external: true
## For Xdebug profiler
# files: