forked from zanfranceschi/rinha-de-backend-2024-q1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
47 lines (43 loc) · 1021 Bytes
/
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
version: '3.9'
services:
api1: &api1
hostname: api1
image: rafaelpadovezi/rinha-2:2.0
depends_on:
- db
environment:
ConnectionStrings__AppDbContext: Host=db;Username=postgres;Password=postgres;Database=rinha;No Reset On Close=true;Max Auto Prepare=10;Auto Prepare Min Usages=1;Pooling=true;Maximum Pool Size=30;
deploy:
resources:
limits:
cpus: "0.42"
memory: "165MB"
api2:
<<: *api1
hostname: api2
db:
image: postgres
volumes:
- ./conf/rinha.dump.sql:/docker-entrypoint-initdb.d/rinha.dump.sql:ro
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: rinha
deploy:
resources:
limits:
cpus: "0.5"
memory: "200MB"
nginx:
image: nginx
volumes:
- ./conf/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api1
- api2
ports:
- "9999:9999"
deploy:
resources:
limits:
cpus: "0.16"
memory: "20MB"