forked from Islandora-Devops/isle-site-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
228 lines (224 loc) · 7.74 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
---
# Common to all ISLE services
x-common: &common
restart: unless-stopped
networks:
- default
networks:
default:
metrics:
volumes:
drupal-private-files: {}
drupal-public-files: {}
drupal-root: {}
drupal-solr-config: {}
drupal-tmp: {}
mariadb-data: {}
solr-data: {}
secrets:
DB_ROOT_PASSWORD:
file: "./secrets/DB_ROOT_PASSWORD"
DRUPAL_DEFAULT_ACCOUNT_PASSWORD:
file: "./secrets/DRUPAL_DEFAULT_ACCOUNT_PASSWORD"
DRUPAL_DEFAULT_DB_PASSWORD:
file: "./secrets/DRUPAL_DEFAULT_DB_PASSWORD"
DRUPAL_DEFAULT_SALT:
file: "./secrets/DRUPAL_DEFAULT_SALT"
JWT_ADMIN_TOKEN:
file: "./secrets/JWT_ADMIN_TOKEN"
JWT_PUBLIC_KEY:
file: "./secrets/JWT_PUBLIC_KEY"
JWT_PRIVATE_KEY:
file: "./secrets/JWT_PRIVATE_KEY"
services:
init:
image: ${ISLANDORA_REPOSITORY}/base:${ISLANDORA_TAG}
entrypoint: ./generate-secrets.sh
working_dir: /run
volumes:
- ./.env:/run/.env
- ./docker-compose.yml:/run/docker-compose.yml
- ./generate-secrets.sh:/run/generate-secrets.sh
- ./secrets:/run/secrets
mariadb:
<<: [*common]
image: ${ISLANDORA_REPOSITORY}/mariadb:${ISLANDORA_TAG}
environment:
MYSQL_MAX_ALLOWED_PACKET: 512000000
volumes:
- mariadb-data:/var/lib/mysql:rw
secrets:
- source: DB_ROOT_PASSWORD
depends_on:
- init
drupal:
<<: [*common]
image: ${SITE_DOCKER_REGISTRY}/drupal:${LIBOPS_PHP_FPM_TAG}
ports:
- "80:80"
environment: &drupal-environment
DEVELOPMENT_ENVIRONMENT: false
GOOGLE_PROJECT_ID: ${LIBOPS_GCLOUD_PROJECT_ID}
DRUPAL_DEFAULT_CANTALOUPE_URL: "${LIBOPS_IIIF_URL}"
DRUPAL_DEFAULT_CONFIGDIR: "/var/www/drupal/config/sync"
DRUPAL_DEFAULT_INSTALL_EXISTING_CONFIG: "true"
DRUPAL_DEFAULT_NAME: "Islandora Digital Collections"
DRUPAL_DEFAULT_PROFILE: "minimal"
DRUPAL_DEFAULT_SITE_URL: "${DOMAIN}"
DRUPAL_DEFAULT_SOLR_CORE: "default"
DRUPAL_DRUSH_URI: "http://${DOMAIN}"
DRUPAL_ENABLE_HTTPS: false
PHP_POST_MAX_SIZE: "4G"
PHP_UPLOAD_MAX_FILESIZE: "4G"
PHP_MEMORY_LIMIT: "4G"
SOLR_HOCR_PLUGIN_PATH: ${SOLR_HOCR_PLUGIN_PATH}
secrets:
- source: DB_ROOT_PASSWORD
- source: DRUPAL_DEFAULT_ACCOUNT_PASSWORD
- source: DRUPAL_DEFAULT_DB_PASSWORD
- source: DRUPAL_DEFAULT_SALT
- source: JWT_PRIVATE_KEY
- source: JWT_PUBLIC_KEY
volumes:
- &drupal-root
type: volume
source: drupal-root
target: /var/www/drupal
read_only: false
- &drupal-public-files
type: volume
source: drupal-public-files
target: /var/www/drupal/web/sites/default/files
read_only: false
- &drupal-private-files
type: volume
source: drupal-private-files
target: /var/www/drupal/private
read_only: false
- &drupal-tmp
type: volume
source: drupal-tmp
target: /tmp
read_only: false
- drupal-solr-config:/opt/solr/server/solr/default:z,rw
- ./tmp/nginx:/var/lib/nginx/tmp:rw
depends_on:
- mariadb
- parry
solr:
<<: [*common]
image: ${ISLANDORA_REPOSITORY}/solr:${ISLANDORA_TAG}
volumes:
- solr-data:/opt/solr/server/solr/default/data:Z,rw
- type: volume
source: drupal-solr-config
target: /opt/solr/server/solr/default
read_only: false
volume:
nocopy: true
depends_on:
- drupal
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.49.1
command:
- -disable_metrics
- cpu_topology,referenced_memory,disk,memory_numa,perf_event,sched,tcp,udp
- -store_container_labels
- "false"
privileged: true
devices:
- /dev/kmsg
networks:
- metrics
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
cap:
image: ${LIBOPS_DOCKER_REGISTRY}/cap:main
networks:
- metrics
environment:
LIBOPS_ENVIRONMENT: "${LIBOPS_ENVIRONMENT}"
LIBOPS_GCLOUD_PROJECT_ID: "${LIBOPS_GCLOUD_PROJECT_ID}"
LIBOPS_ZONE: ${LIBOPS_ZONE}"
CADVISOR_HOST: "cadvisor:8080"
depends_on:
- cadvisor
parry:
<<: [*common]
image: ${LIBOPS_DOCKER_REGISTRY}/parry:main
environment:
LIBOPS_ENVIRONMENT: "${LIBOPS_ENVIRONMENT}"
GOOGLE_PROJECT_ID: "${LIBOPS_GCLOUD_PROJECT_ID}"
remote-control:
<<: [*common]
image: ${LIBOPS_DOCKER_REGISTRY}/remote-control:main
ports:
- "8888:8888"
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup
- /run:/run
- ./secrets:/mnt/disks/data/secrets
- mariadb-data:/mariadb
- /mnt/disks/data/docker:/docker-data
- /etc/systemd/system:/etc/systemd/system:ro
- /home/lnmp:/home/lnmp
- <<: [*drupal-tmp]
volume:
nocopy: true
environment:
LIBOPS_PUBLIC_IP: "${LIBOPS_PUBLIC_IP}"
LIBOPS_ENVIRONMENT: "${LIBOPS_ENVIRONMENT}"
LIBOPS_DATABASE_USERNAME: "${LIBOPS_ENVIRONMENT}"
LIBOPS_GCLOUD_PROJECT_ID: "${LIBOPS_GCLOUD_PROJECT_ID}"
LIBOPS_IIIF_URL: "${LIBOPS_IIIF_URL}"
CLOUD_RUN_URL: "${LIBOPS_DRUPAL_CR_URL}"
GCE_IP: "${LIBOPS_GCE_IP}"
secrets:
- source: DRUPAL_DEFAULT_ACCOUNT_PASSWORD
- source: DRUPAL_DEFAULT_DB_PASSWORD
- source: DRUPAL_DEFAULT_SALT
depends_on:
- init
ssh:
<<: [*common]
image: ${LIBOPS_DOCKER_REGISTRY}/ssh:main
ports:
- "2222:22"
volumes:
# Mount and serve contents of Drupal site.
- <<: [*drupal-root]
volume:
nocopy: true
# Mount and serve Drupal public files.
- <<: [*drupal-public-files]
volume:
nocopy: true
# Mount and serve Drupal private files.
- <<: [*drupal-private-files]
volume:
nocopy: true
- <<: [*drupal-tmp]
volume:
nocopy: true
- ./secrets/JWT_PRIVATE_KEY:/opt/islandora/auth/private.key:ro
- ./secrets/etc/ssh/ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key:ro
- ./secrets/etc/ssh/ssh_host_rsa_key.pub:/etc/ssh/ssh_host_rsa_key.pub:ro
- ./secrets/etc/ssh/ssh_host_ecdsa_key:/etc/ssh/ssh_host_ecdsa_key:ro
- ./secrets/etc/ssh/ssh_host_ecdsa_key.pub:/etc/ssh/ssh_host_ecdsa_key.pub:ro
- ./secrets/etc/ssh/ssh_host_ed25519_key:/etc/ssh/ssh_host_ed25519_key:ro
- ./secrets/etc/ssh/ssh_host_ed25519_key.pub:/etc/ssh/ssh_host_ed25519_key.pub:ro
environment:
<<: [*drupal-environment]
secrets:
- source: DB_ROOT_PASSWORD
- source: DRUPAL_DEFAULT_ACCOUNT_PASSWORD
- source: DRUPAL_DEFAULT_DB_PASSWORD
- source: DRUPAL_DEFAULT_SALT
- source: JWT_PRIVATE_KEY
depends_on:
- init
- drupal