-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
146 lines (127 loc) · 3.95 KB
/
docker-compose.yml
File metadata and controls
146 lines (127 loc) · 3.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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
services:
zookeeper:
image: confluentinc/cp-zookeeper:7.5.0
hostname: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
image: confluentinc/cp-kafka:7.5.0
hostname: kafka
ports:
- "9092:9092" # host-facing listener
- "29092:29092" # internal listener (optional to expose, but handy)
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
# Two listeners: one for other containers, one for your host
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,PLAINTEXT_INTERNAL://0.0.0.0:29092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,PLAINTEXT_INTERNAL://kafka:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT_INTERNAL
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
depends_on:
- zookeeper
akhq:
image: tchiotludo/akhq:latest
environment:
AKHQ_CONFIGURATION: |
akhq:
connections:
docker-kafka-server:
properties:
bootstrap.servers: "kafka:29092"
ports:
- "8080:8080"
depends_on:
- kafka
redis:
image: redis:latest
ports:
- "6379:6379"
redis-commander:
image: rediscommander/redis-commander:latest
environment:
- REDIS_HOSTS=local:redis:6379
ports:
- "8081:8081"
depends_on:
- redis
matchmaking-service:
build:
context: .
dockerfile: src/MatchMaking.Service/Dockerfile
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_URLS: http://+:8088
AllowedHosts: "*"
Cache__MatchLifetime: "1"
Redis__ConnectionString: redis:6379
Kafka__Brokers: kafka:29092
Kafka__MatchmakingRequestTopic: matchmaking.requests
Kafka__MatchmakingCompleteTopic: matchmaking.complete
Kafka__MatchmakingCompleteGroup: matchmaking.complete.services
ports:
- "8088:8088"
depends_on:
- kafka
- redis
matchmaking-worker:
build:
context: .
dockerfile: src/MatchMaking.Worker/Dockerfile
deploy:
replicas: 2
environment:
ASPNETCORE_ENVIRONMENT: Development
Redis__ConnectionString: redis:6379
Kafka__Brokers: kafka:29092
Kafka__MatchmakingRequestTopic: matchmaking.requests
Kafka__MatchmakingCompleteTopic: matchmaking.complete
Kafka__MatchmakingRequestGroup: matchmaking.workers
Assembler__BatchSize: "3"
Assembler__IdleDelay: "00:00:01"
Assembler__QueueKey: matchmaking:queue
Assembler__OutboxKey: matchmaking:outbox
Outboxer__OutboxListKey: matchmaking:outbox
Outboxer__DeadLetterListKey: matchmaking:outbox:dead
Outboxer__PopTimeout: "00:00:01"
Outboxer__IdleDelay: "00:00:05"
depends_on:
- kafka
- redis
k6:
image: grafana/k6:0.51.0
environment:
BASE_URL: "http://matchmaking-service:8088"
RATE: "200"
DURATION_SEC: "300"
WARMUP_SEC: "10"
POLL_INTERVAL_MS: "100"
POLL_TIMEOUT_MS: "15000"
BATCH_SIZE: "3"
PREALLOC_VUS: "600"
MAX_VUS: "1000"
K6_INSECURE_SKIP_TLS_VERIFY: "false" # або "true" якщо https з самопідписаним
volumes:
- ./k6:/scripts:ro
command: ["run", "/scripts/matchmaking_load_test.js"]
k6-lite:
image: grafana/k6:0.51.0
environment:
BASE_URL: "http://matchmaking-service:8088"
RATE: "10" # <= 1 request / 100 ms
DURATION_SEC: "15"
WARMUP_SEC: "10"
POLL_INTERVAL_MS: "100"
POLL_TIMEOUT_MS: "15000"
BATCH_SIZE: "3"
START_DELAY_SEC: "5" # start after the stack is ready
PREALLOC_VUS: "3"
MAX_VUS: "200"
K6_INSECURE_SKIP_TLS_VERIFY: "false"
volumes:
- ./k6:/scripts:ro
command: ["run", "/scripts/matchmaking_load_test.js"]