-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-infra.yml
More file actions
35 lines (32 loc) · 1 KB
/
docker-compose-infra.yml
File metadata and controls
35 lines (32 loc) · 1 KB
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
version: '3.7'
services:
consul:
build:
context: "consul/"
command: |
sh -c 'set -uex; \
consul agent -server -bootstrap-expect=1 -data-dir /consul/data -node=agent-one -enable-script-checks=true -ui -disable-host-node-id -client 0.0.0.0 & \
let "timeout = $$(date +%s) + 15"; \
while ! curl -f -s http://localhost:8500/v1/status/leader | grep "[0-9]:[0-9]"; do\
if [ $$(date +%s) -gt $$timeout ]; then echo "timeout"; exit 1; fi; \
sleep 1; \
done; \
consul kv import @/tmp/values.json && \
tail -f /dev/null'
hostname: consul
ports:
- "8500:8500"
- "8600:8600/udp"
container_name: consul
splunk:
build: "./splunk"
environment:
- "SPLUNK_LICENSE_URI=Free"
- "SPLUNK_START_ARGS=--accept-license --answer-yes"
- "SPLUNK_USER=root"
- "SPLUNK_ENABLE_LISTEN=9997"
- "SPLUNK_PASSWORD=password"
hostname: splunk
ports:
- "8000:8000"
container_name: splunk