forked from zanfranceschi/rinha-de-backend-2024-q1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
86 lines (79 loc) · 1.58 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
85
86
version: '3.5'
services:
api01: &api
image: brunonoriller/app-rinha-de-backend-2024-q1:latest
hostname: api01
volumes:
- data:/app/data
deploy:
resources:
limits:
cpus: '0.32'
memory: '80MB'
api02:
<<: *api
hostname: api02
api03:
<<: *api
hostname: api03
api04:
<<: *api
hostname: api04
nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
command: >
sh -c "
until
curl -s http://api01:3000/seed;
do
echo 'Waiting for API01 to start...';
sleep 5;
done;
echo 'API01 started!';
until
curl -s http://api02:3000/seed;
do
echo 'Waiting for API02 to start...';
sleep 1;
done;
echo 'API02 started!';
until
curl -s http://api03:3000/seed;
do
echo 'Waiting for API03 to start...';
sleep 1;
done;
echo 'API03 started!';
until
curl -s http://api04:3000/seed;
do
echo 'Waiting for API04 to start...';
sleep 1;
done;
echo 'API04 started!';
nginx -g 'daemon off;'"
depends_on:
- api01
- api02
- api03
- api04
ports:
- '9999:9999'
ulimits:
nproc: 65535
nofile:
soft: 20000
hard: 40000
deploy:
resources:
limits:
cpus: '0.22'
memory: '230MB'
networks:
default:
driver: bridge
name: noriller-rinha-2024-q1
volumes:
data: