-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.yml
73 lines (68 loc) · 1.86 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
version: '3.3'
services:
elasticsearch:
image: gui66497/elasticsearch:7.2.0
container_name: es
ports:
- "9200:9200"
- "9300:9300"
environment:
ES_JAVA_OPTS: "-Xmx4G -Xms4G"
ELASTIC_PASSWORD: changeme
volumes:
- ./config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- ./datas/es/:/usr/share/elasticsearch/data
networks:
- elk
kibana:
image: kibana:7.2.0
container_name: kibana
ports:
- "5601:5601"
volumes:
- ./config/kibana.yml:/usr/share/kibana/config/kibana.yml
networks:
- elk
depends_on:
- elasticsearch
api: # Node.js App
container_name: api
build: .
ports:
- "3000:3000" # Expose API port
- "9229:9229" # Expose Node process debug port (disable in production)
environment: # Set ENV vars
- NODE_ENV=local
- ES_HOST=elasticsearch
- PORT=3000
volumes: # Attach local book data directory
- ./fscrawler/books:/usr/src/app/books
networks:
- elk
frontend: # Nginx Server For Frontend App
container_name: frontend
image: nginx
volumes: # Serve local "public" dir
- ./public:/usr/share/nginx/html
command:
bash -c "sed -i 's/API_HOST/192.168.1.35/' /usr/share/nginx/html/app.js && nginx -g 'daemon off;'"
ports:
- "8080:80" # Forward site to localhost:8080
networks:
- elk
fscrawler: # 文档自动存es
container_name: fscrawler
ports:
- "8085:8085"
image: gui66497/fscrawler:2.7-SNAPSHOT
volumes:
- ./fscrawler/books:/usr/share/fscrawler/data/:ro #书本文件夹
- ./fscrawler/myjob:/usr/share/fscrawler/config-mount/myjob:ro #job配置文件
- ./fscrawler/_settings.json:/usr/share/fscrawler/config/_default/7/_settings.json #修改mapping
networks:
- elk
depends_on:
- elasticsearch
networks:
elk:
driver: bridge