-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yaml
78 lines (73 loc) · 1.62 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
version: '3.0'
services:
rinha-db:
image: mariadb:11.2.3
container_name: rinha-db
restart: always
network_mode: host
environment:
- MARIADB_DATABASE=rinha-db
- MARIADB_USER=admin
- MARIADB_PASSWORD=qwerty
- MARIADB_ROOT_PASSWORD=qwerty
volumes:
- ./configs/mysql.conf:/etc/my.cnf
- ./scripts/init_mysql.sql:/docker-entrypoint-initdb.d/init.sql
deploy:
resources:
limits:
cpus: '1.05'
memory: 350M
rinha-api-1:
image: jhonatanrs/los-alamos:latest
container_name: rinha-api-1
restart: always
network_mode: host
environment:
- API_PORT=9910
- DB_HOST=127.0.0.1
- DB_PORT=3306
- DB_USER=admin
- DB_PASSWORD=qwerty
- DB_NAME=rinha-db
depends_on:
- rinha-db
deploy:
resources:
limits:
cpus: '0.15'
memory: 50M
rinha-api-2:
image: jhonatanrs/los-alamos:latest
container_name: rinha-api-2
restart: always
network_mode: host
environment:
- API_PORT=9920
- DB_HOST=127.0.0.1
- DB_PORT=3306
- DB_USER=admin
- DB_PASSWORD=qwerty
- DB_NAME=rinha-db
depends_on:
- rinha-db
deploy:
resources:
limits:
cpus: '0.15'
memory: 50M
nginx:
image: nginx:latest
container_name: rinha-nginx
restart: always
network_mode: host
volumes:
- ./configs/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- rinha-api-1
- rinha-api-2
deploy:
resources:
limits:
cpus: '0.15'
memory: 100M