forked from evaluationcopy/pfsense-suricata-elk-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
164 lines (148 loc) · 6.65 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
---
version: '3'
services:
# The environment variable "TAG" is used throughout this file to
# specify the version of the images to run. The default is set in the
# '.env' file in this folder. It can be overridden with any normal
# technique for setting environment variables, for example:
#
# TAG=6.0.0-beta1 docker-compose up
#
# REF: https://docs.docker.com/compose/compose-file/#variable-substitution
#
# Also be sure to set the ELASTIC_VERSION variable. For released versions,
# ${TAG} and ${ELASTIC_VERSION} will be identical, but for pre-release
# versions, ${TAG} might contain an extra build identifier, like
# "6.0.0-beta1-3eab5b40", so a full invocation might look like:
#
# ELASTIC_VERSION=6.0.0-beta1 TAG=6.0.0-beta1-3eab5b40 docker-compose up
#
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${TAG}
container_name: elasticsearch
environment: ['http.host=0.0.0.0', 'transport.host=127.0.0.1']
ports: ['127.0.0.1:9200:9200']
networks: ['stack']
volumes:
- ./data/elastic/:/usr/share/elasticsearch/data/
kibana:
image: docker.elastic.co/kibana/kibana:${TAG}
container_name: kibana
ports: ['127.0.0.1:5601:5601']
networks: ['stack']
depends_on: ['elasticsearch']
logstash:
image: docker.elastic.co/logstash/logstash:${TAG}
container_name: logstash
# Provide a simple pipeline configuration for Logstash with a bind-mounted file.
volumes:
# - ./config/logstash/logstash.conf:/usr/share/logstash/pipeline/logstash.conf
- ./config/logstash/pipeline/:/usr/share/logstash/pipeline/
- ./config/logstash/patterns/:/usr/share/logstash/patterns/
# - ./config/logstash/GeoLiteCity.dat:/usr/share/logstash/GeoLiteCity.dat
ports: ['192.168.1.13:1514:1514/udp']
networks: ['stack']
depends_on: ['elasticsearch']
# auditbeat:
# image: docker.elastic.co/beats/auditbeat:${TAG}
# container_name: auditbeat
# cap_add: ['AUDIT_CONTROL', 'AUDIT_READ']
# # Auditbeat must run in the main process namespace.
# pid: host
# networks: ['stack']
# depends_on: ['elasticsearch']
# filebeat:
# image: docker.elastic.co/beats/filebeat:${TAG}
# container_name: filebeat
# # If the host system has logs at "/var/log", mount them at "/mnt/log"
# # inside the container, where Filebeat can find them.
# # volumes: ['/var/log:/mnt/log:ro']
# networks: ['stack']
# depends_on: ['elasticsearch', 'setup_filebeat']
# heartbeat:
# image: docker.elastic.co/beats/heartbeat:${TAG}
# container_name: heartbeat
# networks: ['stack']
# depends_on: ['elasticsearch', 'setup_heartbeat']
# metricbeat:
# image: docker.elastic.co/beats/metricbeat:${TAG}
# container_name: metricbeat
# # The commented sections below enable Metricbeat to monitor the Docker host,
# # rather than the Metricbeat container. It's problematic with Docker for
# # Windows, however, since "/proc", "/sys" etc. don't exist on Windows.
# # The same likely applies to OSX (needs testing).
# # volumes:
# # - /proc:/hostfs/proc:ro
# # - /sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro
# # - /:/hostfs:ro
# networks: ['stack']
# depends_on: ['elasticsearch', 'setup_metricbeat']
# packetbeat:
# image: docker.elastic.co/beats/packetbeat:${TAG}
# container_name: packetbeat
# # Packetbeat needs some elevated privileges to capture network traffic.
# # We'll grant them with POSIX capabilities.
# cap_add: ['NET_RAW', 'NET_ADMIN']
# # Use "host mode" networking to allow Packetbeat to capture traffic from
# # the real network interface on the host, rather than being isolated to the
# # container's virtual interface.
# network_mode: host
# # Since we did that, Packetbeat is not part of the "stack" Docker network
# # that the other containers are connected to, and thus can't resolve the
# # hostname "elasticsearch". Instead, we'll tell it to find Elasticsearch
# # on "localhost", which is the Docker host machine in this context.
# command: -e -E 'output.elasticsearch.hosts=["localhost:9200"]'
# depends_on: ['elasticsearch']
# apm_server:
# image: docker.elastic.co/apm/apm-server:${TAG}
# container_name: apm_server
# ports: ['127.0.0.1:8200:8200']
# networks: ['stack']
# depends_on: ['elasticsearch','setup_apm_server']
# # Run short-lived containers to set up the Beats.
# setup_auditbeat:
# image: docker.elastic.co/beats/auditbeat:${TAG}
# container_name: setup_auditbeat
# volumes: ['./scripts/setup-beat.sh:/usr/local/bin/setup-beat.sh:ro']
# # The script may have CR/LF line endings if using Docker for Windows, so
# # remove them so that they won't confuse Bash.
# command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-beat.sh | tr -d "\r" | bash -s auditbeat']
# networks: ['stack']
# depends_on: ['kibana']
# setup_filebeat:
# image: docker.elastic.co/beats/filebeat:${TAG}
# container_name: setup_filebeat
# volumes: ['./scripts/setup-beat.sh:/usr/local/bin/setup-beat.sh:ro']
# command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-beat.sh | tr -d "\r" | bash -s filebeat']
# networks: ['stack']
# depends_on: ['kibana']
# setup_heartbeat:
# image: docker.elastic.co/beats/heartbeat:${TAG}
# container_name: setup_heartbeat
# volumes: ['./scripts/setup-beat.sh:/usr/local/bin/setup-beat.sh:ro']
# command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-beat.sh | tr -d "\r" | bash -s heartbeat']
# networks: ['stack']
# depends_on: ['kibana']
# setup_metricbeat:
# image: docker.elastic.co/beats/metricbeat:${TAG}
# container_name: setup_metricbeat
# volumes: ['./scripts/setup-beat.sh:/usr/local/bin/setup-beat.sh:ro']
# command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-beat.sh | tr -d "\r" | bash -s metricbeat']
# networks: ['stack']
# depends_on: ['kibana']
# setup_packetbeat:
# image: docker.elastic.co/beats/packetbeat:${TAG}
# container_name: setup_packetbeat
# cap_add: ['NET_RAW', 'NET_ADMIN']
# volumes: ['./scripts/setup-beat.sh:/usr/local/bin/setup-beat.sh:ro']
# command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-beat.sh | tr -d "\r" | bash -s packetbeat']
# networks: ['stack']
# depends_on: ['kibana']
# setup_apm_server:
# image: docker.elastic.co/apm/apm-server:${TAG}
# container_name: setup_apm_server
# volumes: ['./scripts/setup-beat.sh:/usr/local/bin/setup-beat.sh:ro']
# command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-beat.sh | tr -d "\r" | bash -s apm-server']
# networks: ['stack']
# depends_on: ['elasticsearch','kibana']
networks: {stack: {}}