forked from zanfranceschi/rinha-de-backend-2024-q1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (51 loc) · 1014 Bytes
/
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
version: "3.9"
services:
api_01: &api
image: aysion/rinha_de_backend_2024_q1-nodejs
restart: unless-stopped
hostname: api_01
environment:
- PORT=8080
depends_on:
- db
deploy:
resources:
limits:
cpus: "0.15"
memory: "120MB"
api_02:
<<: *api
hostname: api_02
nginx:
image: nginx:latest
restart: unless-stopped
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
- api_01
- api_02
ports:
- 9999:9999
deploy:
resources:
limits:
cpus: "0.2"
memory: "10MB"
db:
image: mariadb:11
restart: unless-stopped
hostname: db
environment:
- MARIADB_ROOT_PASSWORD=adminPass
- MARIADB_DATABASE=rinha
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
deploy:
resources:
limits:
cpus: "1"
memory: "300MB"
networks:
default:
driver: bridge
name: rinha-nginx-2024q1