-
Notifications
You must be signed in to change notification settings - Fork 39
/
docker-compose.yaml
118 lines (111 loc) · 3.1 KB
/
docker-compose.yaml
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
version: "3.3"
services:
### Database ###
mssql:
container_name: silverback-mssql
image: mcr.microsoft.com/mssql/server:2019-latest
environment:
ACCEPT_EULA: "Y"
SA_PASSWORD: "mssql2017."
MSSQL_PID: "Developer"
ports:
- "1433:1433"
### Apache Kafka ###
zookeeper:
container_name: silverback-zookeeper
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- "2181:2181"
kafka:
container_name: silverback-kafka
depends_on:
- zookeeper
image: confluentinc/cp-kafka:latest
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT"
KAFKA_INTER_BROKER_LISTENER_NAME: "PLAINTEXT"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_NUM_PARTITIONS: 3
CONFLUENT_SUPPORT_METRICS_ENABLE: 0
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
ports:
- "9092:9092"
schema-registry:
container_name: silverback-schema-registry
depends_on:
- zookeeper
- kafka
image: confluentinc/cp-schema-registry:latest
hostname: schema-registry
ports:
- "8081:8081"
environment:
SCHEMA_REGISTRY_HOST_NAME: "schema-registry"
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: "kafka:29092"
SCHEMA_REGISTRY_LISTENERS: "http://0.0.0.0:8081"
### RabbitMQ ###
# management console http://localhost:15672/#/ (login guest/guest)
rabbit:
container_name: silverback-rabbit
image: rabbitmq:3-management
ports:
- "15672:15672"
- "5672:5672"
### MQTT (emqx)
emqx1:
image: emqx:5.1.0
container_name: silverback-emqx1
environment:
- "EMQX_CLUSTER__DISCOVERY_STRATEGY=static"
- "EMQX_CLUSTER__STATIC__SEEDS=[[email protected],[email protected]]"
healthcheck:
test: ["CMD", "/opt/emqx/bin/emqx", "ctl", "status"]
interval: 5s
timeout: 25s
retries: 5
networks:
default:
aliases:
- node1.emqx.io
emqx2:
image: emqx:5.1.0
container_name: silverback-emqx2
environment:
- "EMQX_CLUSTER__DISCOVERY_STRATEGY=static"
- "EMQX_CLUSTER__STATIC__SEEDS=[[email protected],[email protected]]"
healthcheck:
test: ["CMD", "/opt/emqx/bin/emqx", "ctl", "status"]
interval: 5s
timeout: 25s
retries: 5
networks:
default:
aliases:
- node2.emqx.io
### HA Proxy (used to load balance the emqx cluster nodes)
haproxy:
image: haproxy:latest
container_name: silverback-haproxy
ports:
- "1883:1883"
volumes:
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
depends_on:
- emqx1
- emqx2
networks:
default:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.200.1.1/24