-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yaml
89 lines (84 loc) · 1.92 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
version: '3.8'
services:
nginx:
container_name: nginx
image: nginx:1.25-bookworm
network_mode: host
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- nilapi01
- nilapi02
deploy:
resources:
limits:
cpus: "0.30"
memory: "50MB"
postgres:
container_name: postgres
image: postgres:16.2-bookworm
ports:
- "5432:5432"
volumes:
- ./init-db/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
command: >
postgres -p 5432
-c max_wal_size=4096
-c checkpoint_timeout=600
-c shared_buffers=256MB
-c max_connections=5000
-c synchronous_commit=off
-c log_statement=none
-c commit_delay=1200
-c fsync=off
-c max_parallel_workers=0
-c autovacuum_vacuum_scale_factor=.5
-c log_duration=off
-c log_checkpoints=0
-c log_min_error_statement='panic'
environment:
POSTGRES_PASSWORD: "postgres"
deploy:
resources:
limits:
cpus: "0.82"
memory: "450MB"
nilapi01:
container_name: nilapi01
image: nilferreira/rinha-2024-q1:latest
ports:
- "8080:8080"
environment:
SERVER_URL: 0.0.0.0:8080
DB_HOST: postgres:5432
DB_NAME: postgres
DB_USER: postgres
DB_PASS: postgres
depends_on:
- postgres
deploy:
resources:
limits:
cpus: "0.19"
memory: "25MB"
nilapi02:
container_name: nilapi02
image: nilferreira/rinha-2024-q1:latest
ports:
- "8081:8081"
environment:
SERVER_URL: 0.0.0.0:8081
DB_HOST: postgres:5432
DB_NAME: postgres
DB_USER: postgres
DB_PASS: postgres
depends_on:
- postgres
deploy:
resources:
limits:
cpus: "0.19"
memory: "25MB"
networks:
default:
driver: bridge