forked from zanfranceschi/rinha-de-backend-2024-q1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (64 loc) · 1.7 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
services:
postgres:
container_name: postgres
image: postgres
command: 'postgres -c max_connections=1000 -c work_mem=8MB -c hot_standby=off -c shared_buffers=150MB -c checkpoint_timeout=1d -c wal_level=minimal -c synchronous_commit=off -c fsync=off -c full_page_writes=off -c max_wal_senders=0'
environment:
POSTGRES_PASSWORD: "postgres"
ports:
- "5432:5432"
deploy:
resources:
limits:
cpus: "0.375"
memory: "300MB"
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 5s
timeout: 5s
retries: 20
start_period: 10s
backend-1:
container_name: backend-1
image: joaopmerlin/rinha-de-backend-2024-q1:0.0.1-SNAPSHOT
environment:
SERVER_PORT: 8080
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/postgres
depends_on:
postgres:
condition: service_healthy
deploy:
resources:
limits:
cpus: "0.375"
memory: "100MB"
backend-2:
container_name: backend-2
image: joaopmerlin/rinha-de-backend-2024-q1:0.0.1-SNAPSHOT
environment:
SERVER_PORT: 8080
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/postgres
depends_on:
postgres:
condition: service_healthy
deploy:
resources:
limits:
cpus: "0.375"
memory: "100MB"
envoy:
container_name: envoy
image: envoyproxy/envoy:v1.29.1
volumes:
- ./envoy.yml:/etc/envoy/envoy.yaml
ports:
- "9999:9999"
deploy:
resources:
limits:
cpus: "0.375"
memory: "50MB"
depends_on:
- backend-1
- backend-2
command: [ "envoy", "-c", "/etc/envoy/envoy.yaml" ]