forked from zanfranceschi/rinha-de-backend-2024-q1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
69 lines (61 loc) · 1.36 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
version: '3'
services:
rinha-api-01: &api
image: italopussi/rinha-de-backend-2024-q1-python:latest
hostname: rinha-api-01
container_name: rinha-api-01
restart: on-failure
ports:
- "3001:3000"
depends_on:
- rinha-db
deploy:
resources:
limits:
cpus: "0.4"
memory: "100MB"
rinha-api-02:
<<: *api
hostname: rinha-api-02
container_name: rinha-api-02
ports:
- "3002:3000"
depends_on:
- rinha-db
rinha-db:
image: postgres:16.1
container_name: rinha-db
ports:
- '5432:5432'
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_DATABASE}
volumes:
- ./infra/init.sql:/docker-entrypoint-initdb.d/init.sql
command: postgres -c checkpoint_timeout=600 -c max_wal_size=4096 -c synchronous_commit=0
deploy:
resources:
limits:
cpus: "0.5"
memory: "150MB"
nginx:
image: nginx:latest
container_name: nginx-rinha-2024
restart: on-failure
volumes:
- ./infra/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- rinha-api-01
- rinha-api-02
ports:
- "9999:9999"
deploy:
resources:
limits:
cpus: "0.2"
memory: "20MB"
networks:
default:
driver: bridge
name: rinha-nginx-2024q1