-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
138 lines (136 loc) · 4.04 KB
/
docker-compose.yml
File metadata and controls
138 lines (136 loc) · 4.04 KB
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
version: '3.5'
networks:
elastic:
driver: bridge
volumes:
elasticsearch-data:
certs:
driver: local
services:
rabbitmq:
restart: unless-stopped
image: rabbitmq:3-management
container_name: rabbitmq
ports:
- 5672:5672
- 15672:15672
networks:
- elastic
es01:
build:
context: elasticsearch/
args:
ELK_VERSION: ${ELK_VERSION}
restart: unless-stopped
environment:
xpack.security.enabled: "true"
xpack.license.self_generated.type: "basic"
xpack.security.http.ssl.enabled: "true"
xpack.security.http.ssl.key: "$CERTS_DIR/es01/es01.key"
xpack.security.http.ssl.certificate_authorities: "$CERTS_DIR/ca/ca.crt"
xpack.security.http.ssl.certificate: "$CERTS_DIR/es01/es01.crt"
xpack.security.transport.ssl.enabled: "true"
xpack.security.transport.ssl.verification_mode: "certificate"
xpack.security.transport.ssl.certificate_authorities: "$CERTS_DIR/ca/ca.crt"
xpack.security.transport.ssl.certificate: "$CERTS_DIR/es01/es01.crt"
xpack.security.transport.ssl.key: "$CERTS_DIR/es01/es01.key"
ELASTIC_CLUSTER_NAME: ${ELASTIC_CLUSTER_NAME}
ELASTIC_NODE_NAME: ${ELASTIC_NODE_NAME}
ELASTIC_INIT_MASTER_NODE: ${ELASTIC_INIT_MASTER_NODE}
ELASTIC_DISCOVERY_SEEDS: ${ELASTIC_DISCOVERY_SEEDS}
ES_JAVA_OPTS: -Xmx${ELASTICSEARCH_HEAP} -Xms${ELASTICSEARCH_HEAP}
bootstrap.memory_lock: "true"
volumes:
- certs:$CERTS_DIR
- elasticsearch-data:/usr/share/elasticsearch/data
- ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
ports:
- "9200:9200"
- "9300:9300"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 200000
hard: 200000
networks:
- elastic
filebeat:
build:
context: filebeat/
args:
ELK_VERSION: $ELK_VERSION
restart: unless-stopped
profiles:
- donotstart
command: ./filebeat -e --strict.perms=false
volumes:
- ./filebeat/config/filebeat.yml:/usr/share/filebeat/filebeat.yml
environment:
ELASTIC_USERNAME: ${ELASTIC_USERNAME}
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD}
ELASTICSEARCH_HOST_PORT: ${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}
KIBANA_HOST_PORT: ${KIBANA_HOST}:${KIBANA_PORT}
networks:
- elastic
metricbeat:
build:
context: metricbeat/
args:
ELK_VERSION: $ELK_VERSION
restart: unless-stopped
user: root
environment:
ELASTICSEARCH_HOST_PORT: ${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}
KIBANA_HOST_PORT: ${KIBANA_HOST}:${KIBANA_PORT}
ELASTIC_USERNAME: ${ELASTIC_USERNAME}
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD}
command:
- -e
- --strict.perms=false
volumes:
- type: bind
source: ./metricbeat/config/metricbeat.yml
target: /usr/share/metricbeat/metricbeat.yml
read_only: true
- type: bind
source: /
target: /hostfs
read_only: true
- type: bind
source: /sys/fs/cgroup
target: /hostfs/sys/fs/cgroup
read_only: true
- type: bind
source: /proc
target: /hostfs/proc
read_only: true
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
read_only: true
networks:
- elastic
kib01:
build:
context: kibana/
args:
ELK_VERSION: $ELK_VERSION
restart: unless-stopped
volumes:
- certs:$CERTS_DIR
- ./kibana/config/:/usr/share/kibana/config:ro
environment:
ELASTICSEARCH_SSL_CERTIFICATEAUTHORITIES: $CERTS_DIR/ca/ca.crt
SERVER_SSL_ENABLED: "true"
SERVER_SSL_KEY: $CERTS_DIR/kib01/kib01.key
SERVER_SSL_CERTIFICATE: $CERTS_DIR/kib01/kib01.crt
ELASTIC_USERNAME: ${ELASTIC_USERNAME}
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD}
ELASTICSEARCH_HOST_PORT: ${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}
KIBANA_HOST_PORT: ${KIBANA_HOST}:${KIBANA_PORT}
ports:
- "5601:5601"
networks:
- elastic