-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yml
66 lines (62 loc) · 1.49 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
version: '3.8'
name: rinha-de-backend-lbaesso-php
services:
app1: &app
container_name: app1
image: lbaisso/rinha-de-backend-2024-q1-php:latest
depends_on:
- postgres
network_mode: host
environment:
- DB_HOST=localhost
- DB_PORT=5432
- DB_USER=postgres
- DB_PASS=password
- DB_NAME=rinha
volumes:
- ./conf/www.conf:/usr/local/etc/php-fpm.d/www.conf
- ./conf/zz-docker.conf:/usr/local/etc/php-fpm.d/zz-docker.conf
deploy:
resources:
limits:
cpus: "0.30"
memory: "100MB"
app2:
<<: *app
container_name: app2
volumes:
- ./conf/www2.conf:/usr/local/etc/php-fpm.d/www.conf
- ./conf/zz-docker2.conf:/usr/local/etc/php-fpm.d/zz-docker.conf
nginx:
container_name: nginx-proxy
image: nginx:latest
volumes:
- ./conf/nginx-proxy.conf:/etc/nginx/nginx.conf:ro
depends_on:
- app1
- app2
network_mode: host
expose:
- 9999
deploy:
resources:
limits:
cpus: "0.30"
memory: "40MB"
postgres:
container_name: postgres
hostname: postgres
image: postgres:latest
command: postgres -c 'max_connections=64'
network_mode: host
volumes:
- ./script.sql:/docker-entrypoint-initdb.d/script.sql
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: rinha
deploy:
resources:
limits:
cpus: "0.60"
memory: "310MB"