-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yml
65 lines (62 loc) · 1.35 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
services:
api01: &api
image: adrianog3/rinha-backend-2024-q1:latest
container_name: rinha_api01
hostname: api01
environment:
DB_HOST: localhost
DB_PORT: 5432
DB_NAME: rinha
DB_USER: postgres
DB_PASSWORD: postgres
QUARKUS_HTTP_PORT: 8080
network_mode: "host"
depends_on:
db:
condition: service_healthy
deploy:
resources:
limits:
cpus: "0.25"
memory: "185MB"
api02:
<<: *api
container_name: rinha_api02
hostname: api02
environment:
QUARKUS_HTTP_PORT: 8081
nginx:
image: nginx:1.25.4-alpine
container_name: rinha_nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
network_mode: "host"
depends_on:
- api01
- api02
deploy:
resources:
limits:
cpus: "0.2"
memory: "30MB"
db:
hostname: db
container_name: rinha_db
image: postgres:16.2-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: rinha
network_mode: "host"
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql:ro
deploy:
resources:
limits:
cpus: "0.8"
memory: "150MB"
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 1s
timeout: 5s
retries: 30