-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
169 lines (157 loc) · 4.96 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# This is the Docker Compose entry point for this project.
# Services listed in this file will automatically be built and started when you bring
# the project up.
version: "3.7"
services:
nginx:
image: nginx:mainline-alpine
depends_on:
- drupal
network_mode: service:drupal
volumes:
- ${F1_TLS_CERT}:/etc/nginx/ssl/local.crt:ro,cached
- ${F1_TLS_KEY}:/etc/nginx/ssl/local.key:ro,cached
- ./services/nginx:/etc/nginx/conf.d:ro,cached
- ./services/drupal/web:/var/www/html/web:cached
- type: volume
source: fs-data
target: /var/www/html/web/sites/default/files
- type: volume
source: gesso-pattern-lab
target: /var/www/html/web/themes/epa_theme/pattern-lab
- type: volume
source: gesso-css
target: /var/www/html/web/themes/epa_theme/css
drupal:
build:
context: ./services/drupal
target: dev
# This command line detects if the F1_XDEBUG parameter was set by `f1 up --xdebug',
# and enables XDebug accordingly. We do not do this by default due to the significant
# performance penalty imposed by XDebug.
command:
- /bin/sh
- -c
- |
set -e
chmod -R a+w /var/www/html/web/sites/default/files
if test ! -z "${F1_XDEBUG:-}"; then
docker-php-ext-enable xdebug
echo 'xdebug.remote_enable=1' > /usr/local/etc/php/conf.d/xdebug.ini
fi
exec php-fpm
depends_on:
- mysql
environment:
# This enables connecting back to the user's computer during an XDebug session.
XDEBUG_CONFIG: remote_host=${F1_XDEBUG_REMOTE:-127.0.0.1}
ports:
- 8080:80
- 8443:443
- 5000:5000
volumes:
- ./services/drupal:/var/www/html:cached
- type: volume
source: fs-data
target: /var/www/html/web/sites/default/files
- type: volume
source: gesso-pattern-lab
target: /var/www/html/web/themes/epa_theme/pattern-lab
- type: volume
source: gesso-css
target: /var/www/html/web/themes/epa_theme/css
# MySQL container. Remember to use the hostname "mysql" instead of "localhost" if you're
# used to VM-based (e.g., Vagrant) development.
#
# When the cluster is running, you can connect to MySQL via localhost:13306 using a
# tool like Sequel Pro or MySQL Workbench.
mysql:
image: mysql:5.7
command: --max_allowed_packet=64M
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
ports:
- 13306:3306
volumes:
- ./services/mysql:/docker-entrypoint-initdb.d:ro,cached
- type: volume
source: mysql-data
target: /var/lib/mysql
# MailHog is a mail-catching service. Mail sent to it over SMTP (mailhog:1025) is caught
# in the logs. You can view an inbox UI at http://localhost:8025, which will send
# notifications if your browser supports them.
mailhog:
image: mailhog/mailhog
ports:
- 8025:8025
# Minio is an object storage service that provides an S3-compatible API. It's how we
# will mimic the production environment's use of S3 instead of the filesystem.
#
# When starting this project up for the first time, remember to use `f1 run aws s3 mb'
# to create the necessary bucket(s) - refer to VCAP_SERVICES above to see what's needed.
minio:
image: minio/minio
command:
- minio
- server
- /data
environment:
MINIO_ACCESS_KEY: minio_access
MINIO_SECRET_KEY: minio_secret
# Setting this value allows minio to discover the bucket name by introspecting the
# HTTP Host header, enabling requests to http://drupal.minio:9000 to succeed.
MINIO_DOMAIN: minio
networks:
default:
aliases:
- drupal.minio
ports:
- 8888:9000
volumes:
- type: volume
source: minio-data
target: /data
# Memcached
memcached:
image: memcached:alpine
simplesaml:
depends_on:
- drupal
network_mode: service:drupal
build: ./services/simplesaml
tty: true
# Elasticsearch 7.4
elasticsearch:
image: elasticsearch:7.4.2
environment:
CLUSTER_NAME: elasticsearch
DISCOVERY_SERVICE: elasticsearch
MINIMUM_MASTER_NODES: "1"
EXPECTED_MASTER_NODES: "1"
EXPECTED_DATA_NODES: "1"
RECOVER_AFTER_MASTER_NODES: "1"
RECOVER_AFTER_DATA_NODES: "1"
ES_JAVA_OPTS: -Djava.net.preferIPv4Stack=true -Xms512m -Xmx512m
discovery.type: single-node
volumes:
- type: volume
source: es-data
target: /usr/share/elasticsearch/data
localstack:
image: localstack/localstack:0.12.10
ports:
- 4566:4566
environment:
LOCALSTACK_SERVICES: logs
LOCALSTACK_START_WEB: '0'
AWS_ACCESS_KEY_ID: foobar
AWS_SECRET_ACCESS_KEY: foobar
# Persistent storage volumes. Volumes allow for data to survive container shutdown.
volumes:
es-data: null
fs-data: null
minio-data: null
mysql-data: null
redis-data: null
gesso-pattern-lab: null
gesso-css: null