-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
75 lines (67 loc) · 2.13 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
name: "kafka-rabbitmq-sqs"
networks:
kafka-rabbitmq-sqs:
name: kafka-rabbitmq-sqs
driver: bridge
ipam:
driver: default
config:
- subnet: "172.18.0.0/16"
services:
kafka:
image: bitnami/kafka:3.7.0
container_name: kafka
ports:
- "9092:9092"
environment:
KAFKA_CFG_NODE_ID: 0
KAFKA_CFG_PROCESS_ROLES: controller,broker
KAFKA_CFG_LISTENERS: "PLAINTEXT://172.18.0.10:9092,CONTROLLER://0.0.0.0:9093"
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: "CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT"
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: [email protected]:9093
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
networks:
kafka-rabbitmq-sqs:
ipv4_address: 172.18.0.10
init-kafka:
image: bitnami/kafka:3.7.0
container_name: init-kafka
depends_on:
kafka:
condition: service_started
entrypoint: [ '/usr/bin/bash', '-c' ]
command: |
"
set -ex
# blocks until kafka is reachable
/opt/bitnami/kafka/bin/kafka-topics.sh --bootstrap-server 172.18.0.10:9092 --list
echo -e 'Creating kafka topics'
/opt/bitnami/kafka/bin/kafka-topics.sh --bootstrap-server 172.18.0.10:9092 --create --if-not-exists --topic topic-events --replication-factor 1 --partitions 1
echo -e 'Successfully created the following topics:'
/opt/bitnami/kafka/bin/kafka-topics.sh --bootstrap-server 172.18.0.10:9092 --list
"
networks:
kafka-rabbitmq-sqs:
ipv4_address: 172.18.0.20
localstack:
container_name: "${LOCALSTACK_DOCKER_NAME:-localstack-main}"
image: localstack/localstack:3.4.0
ports:
- "127.0.0.1:4566:4566"
- "127.0.0.1:4510-4559:4510-4559"
environment:
- SERVICES=events,sqs
- DEBUG=true
- DEFAULT_REGION=eu-west-1
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
rabbitmq:
image: 'rabbitmq:3.12-management'
restart: unless-stopped
ports:
- "5672:5672"
- "15672:15672"
environment:
- RABBITMQ_DEFAULT_USER=codely
- RABBITMQ_DEFAULT_PASS=codely