-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yml
63 lines (59 loc) · 1.57 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
version: '3.5'
services:
api1: &api
image: tagliatti/rinha-de-backend-2024-q1-dotnet
hostname: api1
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://+:80
- ConnectionStrings__Postgres=Host=db;Port=5432;Database=rinha-backend;Username=rinha-backend;Password=rinha-backend;Maximum Pool Size=250
- DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
depends_on:
- db
expose:
- "80"
deploy:
resources:
limits:
cpus: '0.3'
memory: '135MB'
api2:
<<: *api
hostname: api2
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://+:80
- ConnectionStrings__Postgres=Host=db;Port=5432;Database=rinha-backend;Username=rinha-backend;Password=rinha-backend;Maximum Pool Size=250
- DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api1
- api2
ports:
- "9999:9999"
deploy:
resources:
limits:
cpus: '0.2'
memory: '80MB'
db:
image: postgres:16
command: ["postgres", "-c", "max_connections=500", "-c", "log_statement=none"]
environment:
POSTGRES_USER: rinha-backend
POSTGRES_PASSWORD: rinha-backend
POSTGRES_DB: rinha-backend
volumes:
- ./database.sql:/docker-entrypoint-initdb.d/database.sql
deploy:
resources:
limits:
cpus: '0.7'
memory: '200MB'
networks:
default:
driver: bridge
name: rinha