-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
64 lines (61 loc) · 1.42 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
version: "3"
services:
lb:
container_name: nginx
deploy:
resources:
limits:
cpus: "0.1"
memory: 10M
image: nginx
network_mode: host
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- app-1
app-1: &app-base
container_name: app-1
deploy:
resources:
limits:
cpus: "0.6"
memory: 200M
build:
context: .
image: daviddeltasierra/rinha-2024-q1-reactor
network_mode: host
environment:
- server.port=8080
- spring.r2dbc.url=r2dbc:postgresql://localhost:5432/rinha
- spring.r2dbc.username=postgres
- spring.r2dbc.password=root
- spring.r2dbc.pool.initial-size=5
- spring.r2dbc.pool.max-size=5
depends_on:
postgress:
condition: service_healthy
app-2:
container_name: app-2
<<: *app-base
environment:
- server.port=8081
postgress:
container_name: postgress
deploy:
resources:
limits:
cpus: "0.2"
memory: 140M
image: postgres:alpine
network_mode: host
user: postgres
command: postgres -c checkpoint_timeout=600 -c max_wal_size=4096 -c shared_buffers=140MB
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 10s
retries: 6
volumes:
- ./scripts:/docker-entrypoint-initdb.d
environment:
- POSTGRES_PASSWORD=root
- POSTGRES_DB=rinha