forked from zanfranceschi/rinha-de-backend-2024-q1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
73 lines (68 loc) · 1.7 KB
/
docker-compose.yaml
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
version: "3.5"
services:
db:
container_name: mongo
image: mongo:latest
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=123
- MONGO_INITDB_DATABASE=rinha
ports:
- "27017:27017"
volumes:
- ./.setup-config/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
deploy:
resources:
limits:
cpus: "0.50"
memory: "400MB"
api01: &api
image: registry.geff.ws/rinha2024q1/grinha-http3:v0.0.2
container_name: api01
depends_on:
- db
environment:
- DB_MAX_POOL_SIZE=150 #default 100
- DB_MIN_POOL_SIZE=0 # default 0
- DB_MAX_CONNECTIONS=3 # default 2
- DB_COMPRESSORS="" # default is empty, without compression = possible: "zstd,zlib,snappy"
- DB_ZLIB_COMPRESS_LEVEL=-1 # -1 to 9 - default -1 = 1 FAST / 9 SLOW
- DB_ZSTD_COMPRESS_LEVEL=-1 # 1 TO 20 - default 6
- DB_PORT=27017
- DB_HOST=mongo
- DB_NAME=rinha
- DB_USER=admin
- DB_PASSWORD=123
- SERVER_HOST=0.0.0.0
- SERVER_PORT=8085
- ENABLE_LOG=false
deploy:
resources:
limits:
cpus: "0.35"
memory: "50mb"
api02:
<<: *api
container_name: api02
lb:
image: registry.geff.ws/rinha2024q1/lb-http-2-quic:v0.0.3
container_name: lb
depends_on:
- api01
- api02
- db
environment:
- SEND_UPSTREAM=https://api01:8085,https://api02:8085
- LISTEN_PORT=9999
- QUIC=true
ports:
- "9999:9999"
deploy:
resources:
limits:
cpus: "0.3"
memory: "50MB"
networks:
default:
driver: bridge
name: rinha-network