-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-osld.yml
92 lines (83 loc) · 2.53 KB
/
docker-compose-osld.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
# Минимальная версия инфраструктуры на базе
# OpenSearch
# OpenSearch Dashboards
# Kafka
# Logstash
version: '3'
services:
app:
image: bitnami/kafka:latest
depends_on:
- kafka
volumes:
- ./volumes/app-kafka/send-jsons.sh:/send-jsons.sh
entrypoint: /send-jsons.sh
zookeeper:
image: 'bitnami/zookeeper:latest'
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: bitnami/kafka:latest
ports:
- '9092:9092'
environment:
# Во внутренней сети docker-compose слушаем адрес kafka:9092
# Из внешней сети docker-compose будем слушать localhost:9094
# Как альтерантива, можно вычислять адрес как-то так:
# HOSTNAME_COMMAND: curl http://169.254.169.254/latest/meta-data/public-hostname
- KAFKA_BROKER_ID=1
- KAFKA_CFG_LISTENERS=PLAINTEXT://0.0.0.0:9092,OUTSIDE://0.0.0.0:9094
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,OUTSIDE://localhost:9094
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,OUTSIDE:PLAINTEXT
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=PLAINTEXT
- ALLOW_PLAINTEXT_LISTENER=yes
logstash:
container_name: logstash
image: opensearchproject/logstash-oss-with-opensearch-output-plugin:latest
depends_on:
- kafka
- opensearch
ports:
- "5044:5044"
- "1111:1111"
environment:
BOOTSTRAP_SERVERS: "kafka:9092"
volumes:
# - ./volumes/logstash/logstash.yml:/usr/share/logstash/config/logstash.yml
- ./volumes/logstash/10-mp-logs.conf:/usr/share/logstash/pipeline/10-mp-logs.conf
opensearch:
container_name: opensearch
image: opensearchproject/opensearch:latest
environment:
- discovery.type=single-node
- http.port=9200
- bootstrap.memory_lock=true
- ES_JAVA_OPTS=-Xms512m -Xmx512m
ports:
- '9200:9200'
- '9600:9600'
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- opensearch-data:/usr/share/opensearch/data
dashboards:
image: opensearchproject/opensearch-dashboards:latest
container_name: opensearch-dashboards
ports:
- 5601:5601
expose:
- "5601"
environment:
OPENSEARCH_HOSTS: '["https://opensearch:9200"]'
depends_on:
- opensearch
volumes:
opensearch-data: