-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yml
90 lines (68 loc) · 1.51 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
version: '3'
services:
rinha-api-01: &api
image: edmarsousa/rinha-api:latest
hostname: rinha-api-01
container_name: rinha-api-01
ports:
- "8001:9501"
environment:
HTTP_PORT: 9501
APP_NAME: rinha_backend_2024
APP_ENV: dev
DB_DRIVER: pgsql
DB_HOST: db
DB_PORT: 5432
DB_DATABASE: rinhadb
DB_USERNAME: postgre
DB_PASSWORD: postgre
depends_on:
- db
deploy:
resources:
limits:
cpus: "0.35"
memory: "160MB"
rinha-api-02:
<<: *api
hostname: rinha-api-02
container_name: rinha-api-02
ports:
- "8002:9501"
depends_on:
- db
db:
container_name: rinha-backend-db
image: postgres:15.4
environment:
POSTGRES_DB: rinhadb
POSTGRES_PASSWORD: postgre
POSTGRES_USER: postgre
command: postgres -c config_file=/etc/postgresql/postgresql.conf
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- ./postgres.conf:/etc/postgresql/postgresql.conf
deploy:
resources:
limits:
cpus: "0.6"
memory: "210MB"
nginx:
image: nginx:latest
container_name: nginx-rinha-2024
volumes:
- ./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-backend-2024