-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
76 lines (68 loc) · 1.36 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
version: '3.7'
services:
elasticsearch:
build: ./es
image: ifelastic
container_name: elasticsearch
environment:
- xpack.security.enabled=false
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
volumes:
- esdata:/usr/share/elasticsearch/data
ports:
- 9200:9200
- 9300:9300
networks:
- esnet
healthcheck:
test: ["CMD", "curl", "-f", "http://0.0.0.0:9200"]
interval: 30s
timeout: 10s
retries: 5
web:
build: ./web
image: ifweb
container_name: web
restart: always
ports:
- "5000:5000"
networks:
- esnet
depends_on:
- elasticsearch
crawler:
build: ./crawler
image: ifcrawler
container_name: crawler
volumes:
- ./crawler:/ifsearch/code
depends_on:
- web
networks:
- esnet
command: sh -c "./wait-for-it.sh elasticsearch:9200 && python -u create_index.py && python -u monitor.py"
monitor:
build: ./crawler
image: ifmonitor
container_name: crawler_monitor
volumes:
- ./crawler:/ifsearch/code
networks:
- esnet
command: bash
stdin_open: true
tty: true
volumes:
esdata:
driver: local
networks:
esnet: