forked from zanfranceschi/rinha-de-backend-2024-q1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
53 lines (48 loc) · 1004 Bytes
/
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
version: '3.5'
services:
api:
image: dreamagici4n/rinha-2024:1.2
hostname: api
environment:
- MONGO_URI=mongodb://db:27017/rinha
- PORT=3000
depends_on:
- db
tty: true
deploy:
replicas: 2
resources:
limits:
cpus: "0.45"
memory: "200MB"
nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api
ports:
- "9999:9999"
deploy:
resources:
limits:
cpus: "0.15"
memory: "10MB"
db:
image: mongo:7.0.5-jammy
hostname: db
ports:
- 27017:27017
environment:
- MONGO_INITDB_DATABASE=rinha
volumes:
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js
deploy:
resources:
limits:
cpus: "0.45"
memory: "140MB"
networks:
default:
driver: bridge
name: rinha-nginx-2024q1