-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
52 lines (51 loc) 路 1.1 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
version: "3.5"
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0
container_name: es
restart: always
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- 'ES_JAVA_OPTS=-Xmx128m -Xms128m'
- bootstrap.memory_lock=true
ports:
- 9200:9200
networks:
- es-kib
healthcheck:
test:
[
"CMD",
"curl",
"-f",
"http://es:9200/_cluster/health?pretty"
]
interval: 30s
timeout: 10s
retries: 3
kibana:
image: docker.elastic.co/kibana/kibana:8.0.0
container_name: kibana
environment:
- ELASTICSEARCH_HOSTS=http://es:9200
- xpack.security.enabled=false
ports:
- "5601:5601"
networks:
- es-kib
depends_on:
- elasticsearch
web:
build: .
container_name: app
restart: on-failure
depends_on:
- es
command: >
sh -c "sleep 30; python app/db.py && uvicorn app.main:app --host 0.0.0.0 --port 8000"
ports:
- 8000:8000
networks:
es-kib:
driver: bridge