-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
125 lines (116 loc) · 3.47 KB
/
docker-compose.yml
File metadata and controls
125 lines (116 loc) · 3.47 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
version: "3"
services:
postgres:
image: postgres:latest
container_name: postgres
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: secret
PGPASSWORD: secret
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./scripts/create-databases.sh:/docker-entrypoint-initdb.d/create-databases.sh:ro
mem_limit: 1024m
redis:
image: redis:latest
container_name: redis
command: sh -cx "redis-server --daemonize yes && redis-cli config set notify-keyspace-events KEx && sleep infinity"
ports:
- "6379:6379"
# will create a new image for game bet events like stake and settle bet events
# redisgamebet:
# image: redis:latest
# container_name: redisgamebet
# command: sh -cx "redis-server --daemonize yes && redis-cli config set notify-keyspace-events KEx && sleep infinity"
# ports:
# - "6381:6381"
mongodbprim:
image: mongo:latest
restart: always
hostname: mongodbprim
container_name: mongodbprim
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=adminpassword
- MONGO_INITDB_DATABASE=user_game_events_db
mem_limit: 768m
# mongodb1:
# image: mongo:latest
# restart: always
# hostname: mongodb1
# container_name: mongodb1
# ports:
# - "27017:27017"
# # environment:
# # - MONGO_INITDB_ROOT_USERNAME=root
# # - MONGO_INITDB_ROOT_PASSWORD=rootpasswd
# # - MONGO_INITDB_DATABASE=user_game_events_db
# command: mongod --replSet replica-set-1
# mem_limit: 768m
# mongoinit:
# image: mongo:latest
# # Exit after executing the command
# restart: "no"
# hostname: minit
# container_name: minit
# depends_on:
# - mongodb1
# command: >
# mongosh --host mongodb1:27017 --eval
# '
# db = (new Mongo("mongodb1:27017")).getDB("user_game_events_db");
# config = {
# "_id" : "replica-set-1",
# "members" : [
# {
# "_id" : 0,
# "host" : "mongodb1:27017"
# }
# ]
# };
# rs.initiate(config);
# '
# mem_limit: 256m
zookeeper:
image: confluentinc/cp-zookeeper:7.2.2
hostname: zookeeper
container_name: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
mem_limit: 128m
broker:
image: confluentinc/cp-kafka:7.2.2
hostname: broker
container_name: broker
depends_on:
- zookeeper
ports:
- "29092:29092"
- "9092:9092"
- "9101:9101"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_JMX_PORT: 9101
KAFKA_JMX_HOSTNAME: localhost
KAFKA_HEAP_OPTS: '-Xmx384m -Xms128m'
KAFKA_JVM_PERFORMANCE_OPTS: '-client -XX:+UseG1GC -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:+DisableExplicitGC -Djava.awt.headless=true'
mem_limit: 768m