-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yml
65 lines (64 loc) · 1.37 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
services:
app01:
image: ramonmelod/rinha-de-backend-2024-q1-nodejs:latest
hostname: app01
network_mode: host
environment:
HTTP_PORT: 8080
HOST: localhost
PORT: 5432
USER: postgres
DATABASE: postgres
PASSWORD: local_password
restart: unless-stopped
depends_on:
- database
deploy:
resources:
limits:
cpus: "0.37"
memory: "60MB"
app02:
image: ramonmelod/rinha-de-backend-2024-q1-nodejs:latest
hostname: app02
network_mode: host
environment:
HTTP_PORT: 8081
HOST: localhost
PORT: 5432
USER: postgres
DATABASE: postgres
PASSWORD: local_password
restart: unless-stopped
depends_on:
- database
deploy:
resources:
limits:
cpus: "0.37"
memory: "60MB"
database:
image: "postgres:16.0-alpine3.18"
environment:
POSTGRES_PASSWORD: "local_password"
network_mode: host
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
deploy:
resources:
limits:
cpus: "0.56"
memory: "400MB"
nginx:
image: nginx:1.25.4-alpine
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
- app01
- app02
network_mode: host
deploy:
resources:
limits:
cpus: "0.2"
memory: "30MB"