-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yml
73 lines (69 loc) · 1.64 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.8"
services:
app1: &app1
image: ogabriel/rinha-de-backend-2024-q1:elixir
restart: always
environment: &env_app1
MIX_ENV: prod
PHX_SERVER: true
DATABASE_HOST: 127.0.0.1
DATABASE_URL: ecto://postgres:[email protected]/rinha
DATABASE_POOL_SIZE: 6
DATABASE_TIMEOUT: 20000
DATABASE_QUEUE_TARGET: 5000
DATABASE_QUEUE_INTERVAL: 10000
SECRET_KEY_BASE: xUZ2aYKI10TzUGY4juCkDIpip9LaDi8KOj0emd8HOHiFZh2zKT5sLXg+0/wzHfnw
ERL_MAX_PORTS: 2046
PORT: 9997
RELEASE_DISTRIBUTION: name
RELEASE_NODE: [email protected]
network_mode: host
depends_on:
- postgres
command: ["migrate_and_release"]
deploy:
resources:
limits:
cpus: '0.35'
memory: '120MB'
app2:
<<: *app1
depends_on:
- app1
environment:
<<: *env_app1
PORT: 9998
RELEASE_NODE: [email protected]
command: ["release"]
nginx:
image: nginx:1.25.3-alpine
restart: always
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
command: ["nginx", "-g", "daemon off;"]
network_mode: host
depends_on:
- app1
- app2
deploy:
resources:
limits:
cpus: '0.2'
memory: '50MB'
postgres:
image: postgres:16.2-alpine
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
network_mode: host
volumes:
- ./postgresql.conf:/etc/postgresql.conf
command: ["postgres", "-c", "config_file=/etc/postgresql.conf"]
deploy:
resources:
limits:
cpus: '0.6'
memory: '260MB'