-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yml
84 lines (77 loc) · 1.55 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
version: '3.9'
services:
rinha-1: &app
container_name: rinha-1
image: fabianoflorentino/rinhadebackend-2024-q1:0.1-linux-amd64
hostname: rinha-1
ports:
- "3001:3000"
links:
- rinha-db
- rinha-db-migration
env_file: .env
deploy:
resources:
limits:
cpus: '0.8'
memory: "240MB"
networks:
- rinha
rinha-2:
<<: *app
container_name: rinha-2
hostname: rinha-2
ports:
- "3002:3000"
rinha-db:
container_name: rinha-db
image: postgres:latest
hostname: rinha-db
volumes:
- rinha:/var/lib/postgresql/data
env_file: .env
deploy:
resources:
limits:
cpus: '0.5'
memory: 55MB
networks:
- rinha
rinha-db-migration:
container_name: rinha-db-migration
image: fabianoflorentino/rinhadebackend-2024-q1:0.1-linux-amd64
hostname: rinha-db-migration
env_file: .env
volumes:
- ./init.sql:/app/init.sql
entrypoint: ["/bin/bash", "-c", "/app/bin/migration"]
depends_on:
- rinha-db
networks:
- rinha
rinha-lb:
container_name: rinha-lb
image: nginx:latest
hostname: rinha-lb
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- 9999:9999
depends_on:
- rinha-1
- rinha-2
deploy:
resources:
limits:
cpus: '0.2'
memory: 15MB
networks:
- rinha
volumes:
rinha:
name: rinhadebackend2
driver: local
networks:
rinha:
name: rinhadebackend2
driver: bridge