forked from spec-nith/ComConnect
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
82 lines (77 loc) · 1.95 KB
/
docker-compose.yml
File metadata and controls
82 lines (77 loc) · 1.95 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
services:
zookeeper:
image: confluentinc/cp-zookeeper:7.4.1
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- "2181:2181"
networks:
- app_network
kafka:
image: confluentinc/cp-kafka:7.4.1
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
ports:
- "9092:9092"
- "29092:29092"
networks:
- app_network
redis:
image: redis:7
command: ["redis-server", "--appendonly", "no"]
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- app_network
backend:
build:
context: .
dockerfile: backend/Dockerfile
ports:
- "5000:5000"
networks:
- app_network
environment:
- NODE_ENV=development
- KAFKA_BROKER=kafka:9092
- KAFKA_CLIENT_ID=notification-service
- KAFKA_GROUP_ID=notification-group
- REDIS_HOST=redis
- REDIS_PORT=6379
- MONGODB_URI=mongodb+srv://akshanshkaushal9:GRS7yWeIDcF8SEMQ@cluster0.t7rpzk9.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0
volumes:
- ./backend:/app/backend
- /app/backend/node_modules
- ./.env:/app/backend/.env
depends_on:
- kafka
- redis
frontend:
build:
context: .
dockerfile: frontend/Dockerfile
ports:
- "3000:3000"
depends_on:
- backend
networks:
- app_network
environment:
- REACT_APP_API_URL=http://localhost:5000
- REACT_APP_SOCKET_URL=http://localhost:5000
networks:
app_network:
driver: bridge