-
Notifications
You must be signed in to change notification settings - Fork 944
/
docker-compose.yml
75 lines (70 loc) · 1.43 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
version: "3.5"
services:
db:
image: postgres:16.2
hostname: db
environment:
- POSTGRES_PASSWORD=gorinha
- POSTGRES_USER=gorinha
- POSTGRES_DB=gorinha
volumes:
- ./boot.sql:/docker-entrypoint-initdb.d/boot.sql
networks:
- rinha-nginx
healthcheck:
test: ["CMD-SHELL", "pg_isready -U gorinha -d gorinha"]
interval: 2s
timeout: 2s
retries: 25
deploy:
resources:
limits:
cpus: "0.53"
memory: "200MB"
api01: &api
hostname: api01
image: andreluizsgf/rinha-de-backend-2024-q1:0.0.5
platform: linux/amd64
environment:
- PG_HOST=db
- PG_USER=gorinha
- PG_PASSWORD=gorinha
- PG_DB=gorinha
networks:
- rinha-nginx
healthcheck:
test: ["CMD-SHELL", "true"]
interval: 2s
timeout: 2s
retries: 25
depends_on:
db:
condition: service_healthy
deploy:
resources:
limits:
cpus: "0.4"
memory: "120MB"
api02:
<<: *api
hostname: api02
nginx:
image: nginx:1.25.4
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
api01:
condition: service_healthy
api02:
condition: service_healthy
ports:
- "9999:9999"
networks:
- rinha-nginx
deploy:
resources:
limits:
cpus: "0.17"
memory: "10MB"
networks:
rinha-nginx: