-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
141 lines (132 loc) · 3.43 KB
/
docker-compose.yml
File metadata and controls
141 lines (132 loc) · 3.43 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
139
140
141
services:
# MQTT Broker - NanoMQ
nanomq:
image: emqx/nanomq:latest
container_name: eventkit-nanomq
ports:
- "1883:1883" # MQTT
- "8883:8883" # MQTT/SSL
- "8083:8083" # WebSocket
- "18083:18083" # HTTP API
environment:
NANOMQ_BROKER_URL: "nmq-tcp://0.0.0.0:1883"
restart: unless-stopped
networks:
- eventkit
# NATS Server with JetStream
nats:
image: nats:latest
container_name: eventkit-nats
ports:
- "4222:4222" # Client
- "8222:8222" # HTTP Monitoring
- "6222:6222" # Routing
command: ["-js", "-m", "8222"]
restart: unless-stopped
networks:
- eventkit
# Redis with Streams support
redis:
image: redis:alpine
container_name: eventkit-redis
ports:
- "6379:6379"
command: redis-server --appendonly yes
volumes:
- redis-data:/data
restart: unless-stopped
networks:
- eventkit
# PostgreSQL
postgres:
image: postgres:16-alpine
container_name: eventkit-postgres
ports:
- "5432:5432"
environment:
POSTGRES_USER: eventkit
POSTGRES_PASSWORD: eventkit
POSTGRES_DB: eventkit
volumes:
- postgres-data:/var/lib/postgresql/data
restart: unless-stopped
networks:
- eventkit
# Apache Kafka
kafka:
image: bitnami/kafka:latest
container_name: eventkit-kafka
ports:
- "9092:9092"
- "9093:9093"
environment:
# KRaft mode (no Zookeeper needed)
KAFKA_CFG_NODE_ID: 0
KAFKA_CFG_PROCESS_ROLES: controller,broker
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 0@kafka:9093
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: PLAINTEXT
# Auto create topics
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "true"
volumes:
- kafka-data:/bitnami/kafka
restart: unless-stopped
networks:
- eventkit
# MongoDB with replica set for Change Streams
mongodb:
image: mongo:7
container_name: eventkit-mongodb
ports:
- "27017:27017"
environment:
MONGO_INITDB_DATABASE: eventkit
command: ["--replSet", "rs0", "--bind_ip_all"]
volumes:
- mongodb-data:/data/db
- ./scripts/init-mongo.sh:/docker-entrypoint-initdb.d/init-mongo.sh:ro
restart: unless-stopped
networks:
- eventkit
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
# HTTP Test Server (simple echo server)
httpserver:
image: mendhak/http-https-echo:latest
container_name: eventkit-httpserver
ports:
- "8080:8080"
- "8443:8443"
environment:
HTTP_PORT: 8080
HTTPS_PORT: 8443
restart: unless-stopped
networks:
- eventkit
# CoAP Test Server (using Eclipse Californium)
# Note: Using a simple container that runs a CoAP server
coapserver:
build:
context: ./test/coap-server
dockerfile: Dockerfile
container_name: eventkit-coapserver
ports:
- "5683:5683/udp" # CoAP
- "5684:5684/tcp" # CoAP over TCP
restart: unless-stopped
networks:
- eventkit
volumes:
redis-data:
postgres-data:
kafka-data:
mongodb-data:
networks:
eventkit:
driver: bridge