-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yml
92 lines (88 loc) · 1.83 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
version: "3.5"
name: "rinha-2024q1"
services:
database:
network_mode: host
hostname: pshost
image: postgres:16.1
environment:
PGUSER: rinha
POSTGRES_USER: rinha
POSTGRES_PASSWORD: testing
POSTGRES_DB: rinha
healthcheck:
test: "pg_isready -p 5432"
interval: 3s
ulimits:
nofile:
soft: 1000000
hard: 1000000
deploy:
resources:
limits:
cpus: '0.7'
memory: '250MB'
logging:
driver: "none"
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
backend01: &backend
network_mode: host
image: not4rt/backend:latest
hostname: backend01
environment: &backendenv
SERVER_ADDR: "0.0.0.0:8080"
DB_HOST: "127.0.0.1"
DB_NAME: "rinha"
DB_USER: "rinha"
DB_PASS: "testing"
depends_on:
database:
condition: service_healthy
ulimits:
nofile:
soft: 1000000
hard: 1000000
deploy:
resources:
limits:
cpus: '0.3'
memory: '75MB'
logging:
driver: "none"
ports:
- "8080:8080/tcp"
backend02:
<<: *backend
hostname: backend02
environment:
<<: *backendenv
SERVER_ADDR: "0.0.0.0:8081"
ports:
- "8081:8081/tcp"
pingora:
network_mode: host
image: not4rt/pingora-lb:latest
environment:
SERVER1_ADDR: "127.0.0.1:8080"
SERVER2_ADDR: "127.0.0.1:8081"
LISTEN_PORT: "9999"
depends_on:
backend01:
condition: service_started
backend02:
condition: service_started
ulimits:
nproc: 1000000
nofile:
soft: 1000000
hard: 1000000
deploy:
resources:
limits:
cpus: '0.2'
memory: '150MB'
logging:
driver: "none"
ports:
- "9999:9999/tcp"