-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
81 lines (76 loc) · 1.68 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
version: '3.5'
services:
api1:
network_mode: host
image: docker.io/library/rinha-de-backend-2023q3-java-spring:0.0.1-SNAPSHOT
depends_on:
- db
deploy:
resources:
limits:
cpus: '0.4'
memory: '0.75GB'
environment:
SERVER_PORT: 8001
DB_HOST: localhost
DB_USERNAME: postgres
DB_PASSWORD: postgres
DB_DATABASE: rinhadb
api2:
network_mode: host
image: docker.io/library/rinha-de-backend-2023q3-java-spring:0.0.1-SNAPSHOT
depends_on:
- db
deploy:
resources:
limits:
cpus: '0.4'
memory: '0.75GB'
environment:
SERVER_PORT: 8002
DB_HOST: localhost
DB_USERNAME: postgres
DB_PASSWORD: postgres
DB_DATABASE: rinhadb
db:
network_mode: host
image: postgres
deploy:
resources:
limits:
cpus: '0.4'
memory: '0.75GB'
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: rinhadb
volumes:
- ./postgresql.conf:/docker-entrypoint-initdb.d/postgresql.conf
command: postgres -c 'max_connections=150'
cache:
network_mode: host
hostname: cache
image: redis:latest
command: [ "redis-server", "--appendonly", "no", "--save ''" ]
ports:
- '6379:6379'
deploy:
resources:
limits:
cpus: '0.15'
memory: '0.5GB'
nginx:
network_mode: host
image: nginx:latest
depends_on:
- api1
- api2
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "9999:9999"
deploy:
resources:
limits:
cpus: '0.15'
memory: '0.25GB'