-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
149 lines (147 loc) · 5.27 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
version: '3.7'
services:
app:
hostname: "${DRUPAL_HOSTNAME}"
container_name: "${COMPOSE_PROJECT_NAME}-app"
image: "${DRUPAL_IMAGE}"
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"
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}"
# 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"
SIMPLETEST_DB: "mysql://drupal:drupal@db:3306/drupal"
BROWSERTEST_OUTPUT_BASE_URL: "https://${DRUPAL_HOSTNAME}"
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: druidfi/mariadb:10.11-drupal
command:
- --max_allowed_packet=512M
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_swedish_ci
environment:
MARIADB_AUTO_UPGRADE: "1"
MARIADB_INITDB_SKIP_TZINFO: "1"
volumes:
- db_data:/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"
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:
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: "--nio --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: selenium/standalone-chrome:106.0
networks:
- internal
profiles:
- testing
networks:
internal:
external: false
stonehenge-network:
external: true
volumes:
db_data:
ssh:
name: stonehenge-ssh
external: true