-
Notifications
You must be signed in to change notification settings - Fork 28
/
docker-compose.yml
56 lines (50 loc) · 1.21 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
version: '3.8'
services:
frontend:
build:
context: ./frontend
ports:
- "3000:80" # Exposing frontend on port 3000
depends_on:
- backend
networks:
- my_network # Using a shared network
backend:
build:
context: ./backend
ports:
- "8080:8080" # Exposing backend on port 8080
depends_on:
- redis
- kafka
environment:
KAFKA_BROKER: kafka:9092
REDIS_HOST: redis
networks:
- my_network # Using a shared network
redis:
image: redis:latest
ports:
- "6379:6379" # Exposing Redis port 6379
networks:
- my_network
kafka:
image: wurstmeister/kafka:latest
ports:
- "9092:9092" # Exposing Kafka port 9092
environment:
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
depends_on:
- zookeeper
networks:
- my_network
zookeeper:
image: wurstmeister/zookeeper:latest
ports:
- "2181:2181" # Exposing Zookeeper port 2181
networks:
- my_network
networks:
my_network: # Define a shared network for inter-service communication
driver: bridge