-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yaml
70 lines (65 loc) · 1.73 KB
/
docker-compose.yaml
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
version: "3.5"
services:
db:
image: postgres:16.2-bullseye
hostname: db
command: "postgres -c checkpoint_timeout=600 -c max_wal_size=4096 -c synchronous_commit=0 -c fsync=0 -c full_page_writes=0"
ports:
- "5432:5432"
volumes:
- ./DbSchema/create_db.sql:/docker-entrypoint-initdb.d/create_db.sql
deploy:
resources:
limits:
cpus: "1.05"
memory: "300MB"
environment:
- POSTGRES_PASSWORD=mystrongpassword
- POSTGRES_USER=admin
- POSTGRES_DB=rinha
api01: &api
image: marcelocferraz/rinha2024q1-marcelo-lucas-dotnet:latest
hostname: api01
ports:
- "8081:8081"
environment:
- API_PORT=8081
- DB_PORT=5432
- DB_HOSTNAME=db
- DB_NAME=rinha
- DB_USER=admin
- DB_PASS=mystrongpassword
depends_on:
- db
deploy:
resources:
limits:
cpus: "0.15"
memory: "100MB"
api02:
<<: *api
hostname: api02
ports:
- "8082:8082"
environment:
- API_PORT=8082
depends_on:
- api01
load_balancer:
image: nginx:latest
volumes:
- ./NginxConf/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api01
- api02
ports:
- "9999:9999"
deploy:
resources:
limits:
cpus: "0.15"
memory: "50MB"
networks:
default:
driver: bridge
name: rinha-nginx-2024q1