forked from kytos-ng/kytos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
142 lines (138 loc) · 4.38 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
################################################################
# This docker-compose file is meant for LOCAL development only #
################################################################
version: '3.3'
services:
mongo-setup:
container_name: mongo-rs-init
image: mongo:5.0
restart: on-failure
volumes:
- ./docker/scripts:/scripts
entrypoint: ["/scripts/rs-init.sh"]
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME:-root_user}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD:-root_pw}
MONGO_USERNAME: ${MONGO_USERNAME:-napp_user}
MONGO_PASSWORD: ${MONGO_PASSWORD:-napp_pw}
MONGO_DBNAME: ${MONGO_DBNAME:-napps}
depends_on:
- mongo1
- mongo2
- mongo3
mongo1:
container_name: mongo1
image: mongo:5.0
volumes:
- mongo1_data:/data/db
ports:
- 27017:27017
restart: always
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs0"]
depends_on:
- mongo2
- mongo3
mongo2:
container_name: mongo2
image: mongo:5.0
volumes:
- mongo2_data:/data/db
ports:
- 27018:27018
restart: always
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs0", "--port", "27018" ]
mongo3:
container_name: mongo3
image: mongo:5.0
volumes:
- mongo3_data:/data/db
ports:
- 27019:27019
restart: always
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs0", "--port", "27019" ]
elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.3
environment:
- bootstrap.memory_lock=true
- cluster.name=es-cluster
- discovery.type=single-node
- cluster.routing.allocation.disk.threshold_enabled=false
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
- xpack.monitoring.enabled=true
- xpack.security.enabled=true
- xpack.security.authc.api_key.enabled=true
- ELASTIC_PASSWORD=${ELASTIC_PASSWORD:-elastic_pw}
volumes:
- esdata:/usr/share/elasticsearch/data
ports:
- 9200:9200
ulimits:
memlock:
soft: -1
hard: -1
kibana:
container_name: kibana
image: docker.elastic.co/kibana/kibana:7.17.3
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- ELASTICSEARCH_URL=http://elasticsearch:9200
- ELASTICSEARCH_USERNAME=${ELASTIC_USERNAME:-elastic}
- ELASTICSEARCH_PASSWORD=${ELASTIC_PASSWORD:-elastic_pw}
- XPACK_SECURITY_ENABLED=true
volumes:
- kibana_data:/usr/share/kibana/data
ports:
- 5601:5601
depends_on:
- elasticsearch
filebeat:
container_name: filebeat
image: docker.elastic.co/beats/filebeat:7.17.3
command: >
filebeat -e
--strict.perms=false
-E output.elasticsearch.hosts=["elasticsearch:9200"]
environment:
- ELASTICSEARCH_USERNAME=${ELASTIC_USERNAME:-elastic}
- ELASTICSEARCH_PASSWORD=${ELASTIC_PASSWORD:-elastic_pw}
- ELASTICSEARCH_HOSTS="elasticsearch:9200"
- KIBANA_HOST="kibana:5601"
volumes:
- ./docker/filebeat/config/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro
- .:/kytos:ro
- filebeat_data:/usr/share/filebeat/data
depends_on:
- elasticsearch
apm-server:
container_name: apm
image: docker.elastic.co/apm/apm-server:7.17.3
cap_add: ["CHOWN", "DAC_OVERRIDE", "SETGID", "SETUID"]
cap_drop: ["ALL"]
environment:
- output.elasticsearch.hosts=["elasticsearch:9200"]
ports:
- "8200:8200"
depends_on:
- kibana
command: >
apm-server -e
-E apm-server.rum.enabled=true
-E apm-server.auth.api_key.enabled=true
-E apm-server.auth.secret_token=${ELASTIC_APM_SECRET_TOKEN:-elasticapm_token}
-E setup.kibana.host=kibana:5601
-E setup.template.settings.index.number_of_replicas=0
-E apm-server.kibana.enabled=true
-E apm-server.kibana.host=kibana:5601
-E apm-server.kibana.username=${ELASTIC_USERNAME:-elastic}
-E apm-server.kibana.password=${ELASTIC_PASSWORD:-elastic_pw}
-E output.elasticsearch.hosts=["elasticsearch:9200"]
-E output.elasticsearch.username=${ELASTIC_USERNAME:-elastic}
-E output.elasticsearch.password=${ELASTIC_PASSWORD:-elastic_pw}
volumes:
mongo1_data:
mongo2_data:
mongo3_data:
esdata:
kibana_data:
filebeat_data: