-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
96 lines (90 loc) · 2.25 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
version: '3.9'
services:
mongodb:
image: mongo
container_name: mongodb
command: ["--replSet", "${MONGO_REPLSET_NAME}", "--port", "${MONGO_PORT}", "--keyFile", "/data/key.file"]
restart: always
healthcheck:
test: |
test $$(sh /data/init-replicaSet.sh) -eq 1
interval: 10s
start_period: 20s
ports:
- 27017:${MONGO_PORT}
volumes:
- ./mongo/initdb.d/:/docker-entrypoint-initdb.d/
- ./mongo/init-replicaSet.sh:/data/init-replicaSet.sh:ro
- ./mongo/key.file:/data/key.file:ro
- mongodbdata:/data/db
env_file: .env
networks:
- db
elasticsearch:
env_file: .env
container_name: elasticsearch
build:
context: elasticsearch/
args:
ELK_VERSION: $ELK_VERSION
ports:
- 9200:9200
- 9300:9300
volumes:
- type: bind
source: ./elasticsearch/config/elasticsearch.yml
target: /usr/share/elasticsearch/config/elasticsearch.yml
read_only: true
- type: volume
source: elasticsearchdata
target: /usr/share/elasticsearch/data
networks:
- elk
kibana:
env_file: .env
environment:
- ELASTICSEARCH_HOSTS=http://${ELASTIC_USER}:${ELASTIC_PASSWORD}@elasticsearch:9200
image: kibana:7.8.1
container_name: kibana
build:
context: kibana/
args:
ELK_VERSION: $ELK_VERSION
ports:
- 5601:5601
volumes:
- type: bind
source: ./kibana/config/kibana.yml
target: /usr/share/kibana/config/kibana.yml
read_only: true
networks:
- elk
depends_on:
- elasticsearch
monstache:
env_file: .env
environment:
- MONSTACHE_ES_USER=${ELASTIC_USER}
- MONSTACHE_ES_PASS=${ELASTIC_PASSWORD}
- MONSTACHE_MONGO_URL=mongodb://${MONGO_INITDB_ROOT_USERNAME}:${MONGO_INITDB_ROOT_PASSWORD}@mongodb:${MONGO_PORT}
image: rwynn/monstache:latest
container_name: monstache
# command: -f /config.toml
# command: tail -F anything
volumes:
- monstachedata:/monstache/
networks:
- db
- elk
depends_on:
- elasticsearch
- mongodb
networks:
db:
driver: bridge
elk:
driver: bridge
volumes:
mongodbdata:
elasticsearchdata:
monstachedata: