-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathcompose.yaml
executable file
·56 lines (51 loc) · 1.38 KB
/
compose.yaml
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
version: '3'
services:
php-1: &php
image: silmaralberti/rinha-frankenphp:1.2
network_mode: host
deploy:
resources:
limits:
cpus: "0.36"
memory: "150MB"
restart: unless-stopped
environment:
DATABASE_URL: "postgresql://rinha:[email protected]:5432/rinha?serverVersion=16&charset=utf8&persistent=true"
LISTEN_PORT: 8001
php-2:
<<: *php
environment:
DATABASE_URL: "postgresql://rinha:[email protected]:5432/rinha?serverVersion=16&charset=utf8&persistent=true"
LISTEN_PORT: 8002
haproxy:
image: haproxy:2.9-alpine
network_mode: host
deploy:
resources:
limits:
cpus: "0.17"
memory: "50MB"
volumes:
- ./docker/haproxy/:/usr/local/etc/haproxy/:ro
depends_on:
- php-1
- php-2
ports:
- ${HTTP_PORT:-9999}:80
database:
image: postgres:16-alpine
network_mode: host
restart: unless-stopped
deploy:
resources:
limits:
cpus: "0.61"
memory: "200MB"
environment:
POSTGRES_USER: "rinha"
POSTGRES_PASSWORD: "rinha-2024"
POSTGRES_DB: "rinha"
command: 'postgres -c config_file="/etc/postgresql.conf"'
volumes:
- ./docker/postgresql/postgres.conf:/etc/postgresql.conf:ro
- ./docker/postgresql/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql:ro