-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yml
82 lines (62 loc) · 1.45 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
82
version: '3.9'
services:
app1: &app
hostname: api1
image: dowingows/rinha-2024-q1-phalcon-php:1.0
deploy:
resources:
limits:
cpus: '0.35'
memory: '80MB'
networks:
- rinha-net
environment:
- PHP_VERSION="8.3"
- DB_HOST=db
- DB_USER=rinha
- DB_PASSWORD=rinha
- DB_NAME=rinha
app2:
<<: *app
hostname: api2
nginx:
image: nginx:latest
volumes:
- ./config/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- app1
networks:
- rinha-net
ports:
- "9999:9999"
deploy:
resources:
limits:
cpus: '0.2'
memory: '30MB'
db:
container_name: db
image: postgres:15.4
environment:
POSTGRES_DB: rinha
POSTGRES_PASSWORD: rinha
POSTGRES_USER: rinha
PGDATA: /var/lib/postgresql/data/db-files/
volumes:
- db-data:/var/lib/postgresql/data
- ./config/init.sql:/docker-entrypoint-initdb.d/init.sql
command: postgres -c 'max_connections=450' -c 'log_error_verbosity=terse' -c 'log_statement=none' -c 'log_min_messages=panic' -c 'shared_buffers=256MB' -c 'effective_cache_size=1GB'
networks:
- rinha-net
ports:
- "5432:5432"
deploy:
resources:
limits:
cpus: '0.6'
memory: '360MB'
volumes:
db-data:
pgadmin-data:
networks:
rinha-net: