-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose-3nodes.yaml
144 lines (135 loc) · 3.91 KB
/
docker-compose-3nodes.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
name: marklogic_spark_3nodes
services:
# See https://caddyserver.com/docs/quick-starts/reverse-proxy for more information on using Caddy as a reverse proxy
# and load balancer.
caddy-load-balancer:
image: caddy:2-alpine
volumes:
- ./caddy/data:/data
- ./caddy/config/Caddyfile:/etc/caddy/Caddyfile
depends_on:
- bootstrap_3n
- node2
- node3
ports:
# For running marklogic-spark-connector tests against the 3-node cluster
- 8016:8816
- 8015:8815
# For running performance tests against quick-table data
- 8009:8809
# For the getting-started project
- 8020:8820
networks:
- external_net
- internal_net
# Named "bootstrap" as it's the first MarkLogic host created. Other MarkLogic hosts will then join the cluster created
# by this host. Note that each MarkLogic host has its 8000-8002 ports exposed externally so that the apps on those
# ports can each be accessed if needed.
bootstrap_3n:
image: "progressofficial/marklogic-db:${MARKLOGIC_TAG}"
platform: linux/amd64
container_name: bootstrap_3n
hostname: bootstrap_3n.local
labels:
logging: "promtail"
logging_jobname: "containerlogs"
environment:
- MARKLOGIC_INIT=true
- MARKLOGIC_ADMIN_USERNAME=admin
- MARKLOGIC_ADMIN_PASSWORD=admin
volumes:
- ./docker/marklogic/logs/bootstrap_3n:/var/opt/MarkLogic/Logs
ports:
- 8000-8002:8000-8002
networks:
- external_net
- internal_net
node2:
image: "progressofficial/marklogic-db:${MARKLOGIC_TAG}"
platform: linux/amd64
container_name: node2
hostname: node2.local
labels:
logging: "promtail"
logging_jobname: "containerlogs"
environment:
- MARKLOGIC_INIT=true
- MARKLOGIC_ADMIN_USERNAME=admin
- MARKLOGIC_ADMIN_PASSWORD=admin
- MARKLOGIC_JOIN_CLUSTER=true
- MARKLOGIC_BOOTSTRAP_HOST=bootstrap_3n.local
volumes:
- ./docker/marklogic/logs/node2:/var/opt/MarkLogic/Logs
depends_on:
- bootstrap_3n
ports:
- 8100-8102:8000-8002
networks:
- external_net
- internal_net
node3:
image: "progressofficial/marklogic-db:${MARKLOGIC_TAG}"
platform: linux/amd64
container_name: node3
hostname: node3.local
labels:
logging: "promtail"
logging_jobname: "containerlogs"
environment:
- MARKLOGIC_INIT=true
- MARKLOGIC_ADMIN_USERNAME=admin
- MARKLOGIC_ADMIN_PASSWORD=admin
- MARKLOGIC_JOIN_CLUSTER=true
- MARKLOGIC_BOOTSTRAP_HOST=bootstrap_3n.local
volumes:
- ./docker/marklogic/logs/node3:/var/opt/MarkLogic/Logs
depends_on:
- bootstrap_3n
ports:
- 8200-8202:8000-8002
networks:
- external_net
- internal_net
grafana:
image: grafana/grafana:latest
ports:
- 3000:3000
volumes:
- ./config/grafana-datasources.yml:/etc/grafana/provisioning/datasources/datasources.yaml
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
networks:
- external_net
- internal_net
loki:
image: grafana/loki:latest
ports:
- 3100:3100
command: -config.file=/etc/loki/local-config.yaml
networks:
- external_net
- internal_net
promtail:
image: grafana/promtail:latest
container_name: promtail
volumes:
- ./config/promtail.yaml:/etc/promtail/docker-config.yaml
- ./docker/marklogic/logs:/var/log/marklogic
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /var/run/docker.sock:/var/run/docker.sock
command: -config.file=/etc/promtail/docker-config.yaml
depends_on:
- loki
- bootstrap_3n
- node2
- node3
networks:
- internal_net
networks:
external_net: { }
internal_net:
internal: true
driver_opts:
com.docker.network.bridge.enable_icc: "true"