-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yml
45 lines (42 loc) · 912 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
version: '3.8'
services:
api1: &api
image: jorgehrique/rinha-backend-app-24-q1:1.0.0
container_name: api1
depends_on:
- mongo
deploy:
resources:
limits:
cpus: '0.30'
memory: '100M'
api2:
<<: *api
container_name: api2
nginx: # Load Balancer
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api1
- api2
ports:
- "9999:9999"
deploy:
resources:
limits:
cpus: '0.10'
memory: '20M'
mongo: # Banco de dados
image: mongo:7.0.5-jammy
container_name: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: user
MONGO_INITDB_ROOT_PASSWORD: pass
volumes:
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
deploy:
resources:
limits:
cpus: '0.80'
memory: '280M'