-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yaml
79 lines (74 loc) · 1.55 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
71
72
73
74
75
76
77
78
79
version: "3.5"
services:
api-service01: &api-service
image: leocrispindev/rinhabackend:v1.0.0-linux
hostname: service01
ports:
- "8081:8080"
environment:
- DB_HOST=db
depends_on:
- db
networks:
default:
aliases:
- service01
deploy:
resources:
limits:
cpus: "0.25"
memory: "110MB"
api-service02:
<<: *api-service
hostname: api-service02
environment:
- DB_HOST=db
ports:
- "8082:8080"
networks:
default:
aliases:
- service02
db:
image: postgres:latest
hostname: db
environment:
- POSTGRES_PASSWORD=admin123
- POSTGRES_USER=admin
- POSTGRES_DB=financeiro
ports:
- "5432:5432"
networks:
default:
aliases:
- db
volumes:
- ./initDB.sql:/docker-entrypoint-initdb.d/script.sql
command: postgres -c checkpoint_timeout=600 -c max_wal_size=4096 -c synchronous_commit=0 -c full_page_writes=0
deploy:
resources:
limits:
cpus: "0.90"
memory: "300MB"
nginx:
image: nginx:latest
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api-service01
- api-service02
ports:
- "9999:9999"
networks:
default:
aliases:
- nginx
deploy:
resources:
limits:
cpus: "0.10"
memory: "30MB"
networks:
default:
driver: bridge
name: rinha-nginx-2024q1