-
Notifications
You must be signed in to change notification settings - Fork 111
/
docker-compose.yml
131 lines (128 loc) · 3.76 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
services:
db:
image: postgres:14.1-alpine
restart: always
environment:
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
volumes:
- pgsql:/var/lib/postgresql/data
ports:
- 5432:5432
qdrant_primary:
image: "qdrant/qdrant:v1.11.4"
volumes:
- qdrant_primary:/qdrant/storage
ports:
- "6334:6334"
- "6333:6333"
environment:
QDRANT__CLUSTER__ENABLED: "true"
ulimits:
nofile:
soft: 64000
hard: 64000
command: ["./qdrant", "--uri", "http://qdrant_primary:6335"]
healthcheck:
test: ["CMD", "sleep", "5"] # Hack: `curl` not accessible in qdrant image, sleep for 5 seconds.
interval: 1s
timeout: 10s
retries: 1 # Only retry once to minimize delay
qdrant_secondary:
image: "qdrant/qdrant:v1.11.4"
volumes:
- qdrant_secondary:/qdrant/storage
environment:
QDRANT__CLUSTER__ENABLED: "true"
ulimits:
nofile:
soft: 64000
hard: 64000
command: ["./qdrant", "--bootstrap", "http://qdrant_primary:6335"]
depends_on:
qdrant_primary:
condition: service_healthy # Ensure qdrant is healthy before starting qdrant_primary.
redis:
image: redis
ports:
- 6379:6379
apache-tika:
image: apache/tika:2.9.2.1
ports:
- "9998:9998"
elasticsearch:
build:
context: .
dockerfile: elasticsearch.Dockerfile
args:
ES_VERSION: ${ES_LOCAL_VERSION}
container_name: ${ES_LOCAL_CONTAINER_NAME}
volumes:
- dev-elasticsearch:/usr/share/elasticsearch/data
ports:
- 9200:9200
environment:
- discovery.type=single-node
- ELASTIC_PASSWORD=${ELASTICSEARCH_PASSWORD}
- xpack.security.enabled=true
- xpack.security.http.ssl.enabled=false
- xpack.license.self_generated.type=trial
- xpack.ml.use_auto_machine_memory_percent=true
- ES_JAVA_OPTS=-Xms${ES_LOCAL_HEAP_INIT} -Xmx${ES_LOCAL_HEAP_MAX}
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test:
[
"CMD-SHELL",
"curl --output /dev/null --silent --head --fail -u elastic:${ELASTICSEARCH_PASSWORD} http://elasticsearch:${ES_LOCAL_PORT}",
]
interval: 5s
timeout: 5s
retries: 10
kibana_settings:
depends_on:
elasticsearch:
condition: service_healthy
image: docker.elastic.co/elasticsearch/elasticsearch:${ES_LOCAL_VERSION}
container_name: kibana_settings
restart: "no"
command: >
bash -c '
echo "Setup the kibana_system password";
until curl -s -u "elastic:${ELASTICSEARCH_PASSWORD}" -X POST http://elasticsearch:${ES_LOCAL_PORT}/_security/user/kibana_system/_password -d "{\"password\":\"'${KIBANA_LOCAL_PASSWORD}'\"}" -H "Content-Type: application/json" | grep -q "^{}"; do sleep 5; done;
'
kibana:
depends_on:
kibana_settings:
condition: service_completed_successfully
image: docker.elastic.co/kibana/kibana:${ES_LOCAL_VERSION}
container_name: ${KIBANA_LOCAL_CONTAINER_NAME}
volumes:
- dev-kibana:/usr/share/kibana/data
ports:
- 127.0.0.1:${KIBANA_LOCAL_PORT}:5601
environment:
- SERVER_NAME=kibana
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- ELASTICSEARCH_USERNAME=kibana_system
- ELASTICSEARCH_PASSWORD=${KIBANA_LOCAL_PASSWORD}
- XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY=${KIBANA_ENCRYPTION_KEY}
- ELASTICSEARCH_PUBLICBASEURL=http://localhost:${ES_LOCAL_PORT}
healthcheck:
test:
[
"CMD-SHELL",
"curl -s -I http://kibana:5601 | grep -q 'HTTP/1.1 302 Found'",
]
interval: 10s
timeout: 10s
retries: 20
volumes:
pgsql:
qdrant_primary:
qdrant_secondary:
dev-elasticsearch:
dev-kibana: