-
Notifications
You must be signed in to change notification settings - Fork 6
/
compose.yaml
181 lines (180 loc) · 6.95 KB
/
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
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
services:
app:
container_name: "${COMPOSE_PROJECT_NAME}-app"
image: "${DRUPAL_IMAGE}"
hostname: "${COMPOSE_PROJECT_NAME}"
volumes:
- .:/app:delegated
depends_on:
- db
environment:
STAGE_FILE_PROXY_ORIGIN: "${STAGE_FILE_PROXY_ORIGIN}"
STAGE_FILE_PROXY_ORIGIN_DIR: "${STAGE_FILE_PROXY_ORIGIN_DIR}"
APP_ENV: "${APP_ENV:-local}"
ELASTIC_PROXY_URL: ${ELASTIC_PROXY_URL:-""}
DRUPAL_ROUTES: "https://varnish-${DRUPAL_HOSTNAME},https://helfi-proxy.docker.so,http://${COMPOSE_PROJECT_NAME}-varnish,http://${COMPOSE_PROJECT_NAME}"
DRUPAL_REVERSE_PROXY_ADDRESS: helfi-proxy.docker.so
DRUSH_OPTIONS_URI: "https://${DRUPAL_HOSTNAME}"
# To enable xdebug, run `export XDEBUG_ENABLE=true` before (re)starting your project.
# Optionally, you can add this to your default environments variables to enable or disable
# xdebug by default (like /etc/environments, ~/.bashrc, or ~/.zshrc).
XDEBUG_ENABLE: "${XDEBUG_ENABLE:-false}"
XDEBUG_CONFIG: "${XDEBUG_CONFIG:-}"
PHP_IDE_CONFIG: "${PHP_IDE_CONFIG:-serverName=${DRUPAL_HOSTNAME}}"
# DOCKERHOST: host.docker.internal
# Use drush server to run functional tests, so we don't have to care about
# permission or SSL issues.
SIMPLETEST_BASE_URL: "http://app:8888"
BROWSERTEST_OUTPUT_BASE_URL: "https://${DRUPAL_HOSTNAME}"
BROWSERTEST_OUTPUT_DIRECTORY: "/app/public/sites/default/files/simpletest"
DRUPAL_VARNISH_HOST: "${COMPOSE_PROJECT_NAME}-varnish"
DRUPAL_VARNISH_PORT: 6081
REDIS_HOST: redis
PROJECT_NAME: "${PROJECT_NAME}"
extra_hosts:
- "host.docker.internal:host-gateway"
- "${DRUPAL_HOSTNAME}:host-gateway"
networks:
- internal
- stonehenge-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.entrypoints=https"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.rule=Host(`${DRUPAL_HOSTNAME}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.tls=true"
- "traefik.http.services.${COMPOSE_PROJECT_NAME}-app.loadbalancer.server.port=8080"
- "traefik.docker.network=stonehenge-network"
redis:
container_name: "${COMPOSE_PROJECT_NAME}-redis"
image: redis:7-alpine
command: [sh, -c, "rm -f /data/dump.rdb && redis-server --save ''"]
networks:
- internal
db:
container_name: "${COMPOSE_PROJECT_NAME}-db"
image: mysql:8
command:
- --max_allowed_packet=512M
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_swedish_ci
environment:
MYSQL_DATABASE: drupal
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
MYSQL_INITDB_SKIP_TZINFO: 1
MYSQL_RANDOM_ROOT_PASSWORD: 1
volumes:
- db_volume:/var/lib/mysql
ports:
- 3306
networks:
- internal
varnish:
container_name: "${COMPOSE_PROJECT_NAME}-varnish"
image: druidfi/varnish:6-drupal
environment:
VARNISH_BACKEND_HOST: "${COMPOSE_PROJECT_NAME}-app"
VARNISH_CACHE_STATIC_FILES: "1"
depends_on:
- app
networks:
- internal
- stonehenge-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-varnish.entrypoints=https"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-varnish.rule=Host(`varnish-${DRUPAL_HOSTNAME}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-varnish.tls=true"
- "traefik.http.services.${COMPOSE_PROJECT_NAME}-varnish.loadbalancer.server.port=6081"
- "traefik.docker.network=stonehenge-network"
elastic-proxy:
container_name: "${COMPOSE_PROJECT_NAME}-elastic-proxy"
image: nginxinc/nginx-unprivileged:alpine-perl
environment:
ELASTICSEARCH_URL: "http://elastic:9200"
volumes:
- ./docker/elastic-proxy/nginx.conf:/etc/nginx/nginx.conf
- ./docker/elastic-proxy/elastic.conf:/etc/nginx/templates/default.conf.template
networks:
- stonehenge-network
- internal
labels:
- "traefik.enable=true"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-elastic-proxy.entrypoints=https"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-elastic-proxy.rule=Host(`elastic-proxy-${DRUPAL_HOSTNAME}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-elastic-proxy.tls=true"
- "traefik.http.services.${COMPOSE_PROJECT_NAME}-elastic-proxy.loadbalancer.server.port=8080"
- "traefik.docker.network=stonehenge-network"
- "traefik.http.middlewares.cors-header.headers.accesscontrolallowmethods=GET,OPTIONS,POST"
- "traefik.http.middlewares.cors-header.headers.accesscontrolallowheaders=*"
- "traefik.http.middlewares.cors-header.headers.accesscontrolalloworiginlist=*"
- "traefik.http.middlewares.cors-header.headers.accesscontrolmaxage=100"
- "traefik.http.middlewares.cors-header.headers.addvaryheader=true"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-elastic-proxy.middlewares=cors-header"
depends_on:
- elastic
profiles:
- search
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:8.4.0
container_name: "${COMPOSE_PROJECT_NAME}-elastic"
environment:
- node.name="${COMPOSE_PROJECT_NAME}-elastic"
- discovery.seed_hosts=elastic
- cluster.name=es-docker-cluster
- cluster.initial_master_nodes="${COMPOSE_PROJECT_NAME}-elastic"
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "http.cors.allow-origin=\"*\""
- "http.cors.enabled=true"
- "http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization"
- "http.cors.allow-credentials=true"
- xpack.security.enabled=false
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 9200-9220:9200
networks:
- internal
- stonehenge-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-elastic.entrypoints=https"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-elastic.rule=Host(`elastic-${DRUPAL_HOSTNAME}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-elastic.tls=true"
- "traefik.http.services.${COMPOSE_PROJECT_NAME}-elastic.loadbalancer.server.port=9200"
- "traefik.docker.network=stonehenge-network"
- "traefik.port=9200"
profiles:
- search
artemis:
container_name: "${COMPOSE_PROJECT_NAME}-artemis"
image: quay.io/artemiscloud/activemq-artemis-broker
environment:
AMQ_EXTRA_ARGS: "--user admin --password admin"
depends_on:
- app
networks:
- internal
profiles:
- queue
chromium:
# @todo Update this to newer version once minkphp supports Selenium 4.
# @see https://github.com/minkphp/MinkSelenium2Driver/pull/372
image: seleniarm/standalone-chromium:106.0
networks:
- internal
profiles:
- testing
networks:
internal:
external: false
stonehenge-network:
external: true
volumes:
db_volume:
ssh:
name: stonehenge-ssh
external: true