-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
81 lines (81 loc) · 2.31 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
# a docker-compose.yml to start a simple cluster with 1 ZooKeeper node (external) and 1 Solr nodes.
# Check this page (https://hathitrust.atlassian.net/wiki/spaces/HAT/pages/3190292502/Solr+cloud+and+external+Zookeeper+parameters)
# to a better understanding of Solr and Zookeeper set up.
services:
solr_manager:
build:
context: solr_manager
target: runtime
dockerfile: Dockerfile
args:
UID: ${UID:-1000}
GID: ${GID:-1000}
ENV: ${ENV:-dev}
POETRY_VERSION: ${POETRY_VERSION:-1.5.1}
SOLR_PASSWORD: ${SOLR_PASSWORD:-solr}
SOLR_USER: ${SOLR_USER:-solrRocks}
ZK_HOST: ${ZK_HOST:-zoo1:2181}
env_file:
- solr_manager/.env
volumes:
- .:/app
stdin_open: true
depends_on:
solr1:
condition: service_healthy
tty: true
container_name: solr_manager
networks:
- solr
profiles: [ solr_collection_manager ]
solr1:
build:
context: .
dockerfile: solr8.11.2_cloud/Dockerfile
target: external_zookeeper_docker
container_name: solr1
ports:
- "8983:8983"
environment:
- ZK_HOST=zoo1:2181
- SOLR_OPTS=-XX:-UseLargePages
networks:
- solr
depends_on:
zoo1:
condition: service_healthy
volumes:
- solr1_data:/var/solr/data
command: solr-foreground -c # Solr command to start the container to make sure the security.json is created
healthcheck:
test: [ "CMD", "/usr/bin/curl", "-s", "-f", "http://solr1:8983/solr/#/admin/ping" ]
interval: 30s
timeout: 10s
retries: 5
zoo1:
image: zookeeper:3.8.0
container_name: zoo1
restart: always
hostname: zoo1
ports:
- 2181:2181
- 7001:7000
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=zoo1:2888:3888;2181
ZOO_4LW_COMMANDS_WHITELIST: mntr, conf, ruok
ZOO_CFG_EXTRA: "metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider metricsProvider.httpPort=7000 metricsProvider.exportJvmInfo=true"
networks:
- solr
volumes:
- zoo1_data:/data
healthcheck:
test: [ "CMD", "echo", "ruok", "|", "nc", "localhost", "2181", "|", "grep", "imok" ]
interval: 30s
timeout: 10s
retries: 5
networks:
solr:
volumes:
solr1_data: null
zoo1_data: null