-
Notifications
You must be signed in to change notification settings - Fork 944
/
docker-compose.yml
73 lines (73 loc) · 1.94 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
version: '3.5'
services:
api1: &api
image: jnariai/rinha-backend-2024-q1-laravel:octane-debug
restart: always
hostname: api1
platform: linux/amd64
environment:
DB_HOST: db
DB_DATABASE: "rinha"
DB_USERNAME: "phpUser"
DB_PASSWORD: "explode"
APP_ENV: "prod"
APP_NAME: "Rinha de backend"
depends_on:
db:
condition: service_healthy
links:
- db
networks:
- rinha-net
deploy:
resources:
limits:
cpus: "0.45"
memory: "120MB"
api2:
<<: *api
db:
image: postgres:16.2-alpine3.19
hostname: db
restart: always
environment:
POSTGRES_HOST: localhost
POSTGRES_PASSWORD: explode
POSTGRES_USER: phpUser
POSTGRES_DB: rinha
healthcheck:
test: ["CMD-SHELL", "pg_isready -U phpUser -d rinha"]
interval: 2s
timeout: 2s
retries: 25
volumes:
- ./postgres/:/docker-entrypoint-initdb.d/
command: postgres -c checkpoint_timeout=600 -c max_wal_size=4096 -c synchronous_commit=0 -c fsync=0 -c full_page_writes=0
ports:
- "5432:5432"
networks:
- rinha-net
deploy:
resources:
limits:
cpus: "0.35"
memory: "285MB"
nginx:
image: nginx:1.25.3-alpine3.18
restart: always
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "9999:9999"
networks:
- rinha-net
depends_on:
- api1
- api2
deploy:
resources:
limits:
cpus: "0.25"
memory: "25MB"
networks:
rinha-net: