-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (47 loc) · 1.25 KB
/
docker-compose.yml
File metadata and controls
49 lines (47 loc) · 1.25 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.13.4
container_name: es01
environment:
- discovery.type=single-node
- xpack.security.enabled=true
- xpack.security.http.ssl.enabled=false
- ES_JAVA_OPTS=-Xms512m -Xmx512m
- ELASTIC_PASSWORD=spiceai
ports:
- "9200:9200"
volumes:
- esdata:/usr/share/elasticsearch/data
healthcheck:
test:
[
"CMD-SHELL",
"curl -sf -u elastic:spiceai http://localhost:9200/_cluster/health | grep -qE '\"status\":\"(green|yellow)\"'",
]
interval: 10s
timeout: 10s
retries: 15
start_period: 40s
es-init:
image: python:3.12-slim
container_name: es-init
depends_on:
elasticsearch:
condition: service_healthy
volumes:
- ./generate_data.py:/app/generate_data.py:ro
- ./load_data.py:/app/load_data.py:ro
working_dir: /app
environment:
- ES_HOST=http://elasticsearch:9200
- ES_USER=elastic
- ES_PASS=spiceai
command: >
bash -c "
pip install --quiet pandas pyarrow faker requests &&
python generate_data.py &&
python load_data.py --all-types
"
volumes:
esdata:
driver: local