-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yml
70 lines (67 loc) · 1.65 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
version: '3.9'
services:
postgres:
container_name: rinha_postgres
image: postgres:14-alpine
ports:
- 5432:5432
volumes:
- ./postgres/init:/docker-entrypoint-initdb.d:ro
environment:
POSTGRES_DB: db
POSTGRES_USER: user
POSTGRES_PASSWORD: password
PG_MAX_WAL_SIZE: '2GB'
PG_MIN_WAL_SIZE: '1GB'
PG_CHECKPOINT_TIMEOUT: '10min'
PG_WORK_MEM: '64MB'
PG_MAINTENANCE_WORK_MEM: '128MB'
PG_EFFECTIVE_CACHE_SIZE: '2GB'
PG_SHARED_BUFFERS: '512MB'
PG_MAX_CONNECTIONS: '40'
deploy:
resources:
limits:
cpus: '0.5'
memory: "200MB"
rinha_api_01: &rinha_api_01
image: andarilhoz/rinha-de-backend-2024-q1-api:latest
environment:
DATABASE_HOST: postgres
DATABASE_NAME: db
DATABASE_USER: user
DATABASE_PORT: 5432
DATABASE_PASSWORD: password
LOG_LEVEL: debug
SERVER_PORT: 8080
depends_on:
- postgres
deploy:
resources:
limits:
cpus: '0.4'
memory: "75MB"
rinha_api_02:
<<: *rinha_api_01
environment:
DATABASE_HOST: postgres
DATABASE_NAME: db
DATABASE_USER: user
DATABASE_PORT: 5432
DATABASE_PASSWORD: password
SERVER_PORT: 8081
nginx:
image: nginx:1.25.3
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
restart: unless-stopped
depends_on:
- rinha_api_01
- rinha_api_02
ports:
- "9999:9999"
deploy:
resources:
limits:
cpus: "0.2"
memory: "200MB"