-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
91 lines (90 loc) · 2.53 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
version: '3.7'
services:
central-service:
build: ./central-service
depends_on:
- broker
- zookeeper
- db
- redis-cache
restart: on-failure
ports:
- 5000:5000
environment:
FIREBASE_CREDENTIALS_FILEPATH: '/app/serviceKey.json'
DB_USER: ${POSTGRES_USER}
DB_PASSWORD: ${POSTGRES_PASSWORD}
DB_NAME: ${POSTGRES_DB}
MAX_NUM_ROUND_PER_ROOM: ${MAX_NUM_ROUND_PER_ROOM}
REDIS_PASSWORD: ${REDIS_PASSWORD}
KAFKA_BROKER: ${KAFKA_BROKER}
KAFKA_INGRESS_TOPIC: ${KAFKA_INGRESS_TOPIC}
KAFKA_EGRESS_TOPIC: ${KAFKA_EGRESS_TOPIC}
KAFKA_CENTRAL_SERVICE_GID: ${KAFKA_CENTRAL_SERVICE_GID}
rtc-service:
build: ./rtc-service
worker-service:
build: ./worker-service
environment:
LEETCODE_USERNAME: ${LEETCODE_USERNAME}
LEETCODE_PASSWORD: ${LEETCODE_PASSWORD}
db:
image: postgres
restart: always
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- db-volume:/var/lib/postgresql/data
redis-cache:
image: bitnami/redis:latest
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
volumes:
- redis-volume:/bitnami/redis/data
zookeeper:
image: confluentinc/cp-zookeeper:7.3.0
hostname: zookeeper
container_name: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
volumes:
- zookeeper-data-volume:/var/lib/zookeeper/data
- zookeeper-log-volume:/var/lib/zookeeper/log
broker:
image: confluentinc/cp-kafka:7.3.0
container_name: broker
ports:
- "29092:29092"
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:9092,PLAINTEXT_HOST://broker:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
volumes:
- kafka-data-volume:/var/lib/kafka/data
adminer:
image: adminer
restart: always
ports:
- 8080:8080
redisinsight:
image: redislabs/redisinsight:latest
ports:
- 8001:8001
volumes:
db-volume:
redis-volume:
driver: local
zookeeper-data-volume:
zookeeper-log-volume:
kafka-data-volume: