-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
65 lines (63 loc) · 1.4 KB
/
docker-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
57
58
59
60
61
62
63
64
65
version: "3"
services:
api01: &api
image: codesilva/rinha-de-backend:0.2.0
container_name: api01
hostname: api01
ulimits:
nproc: 1000000
nofile:
soft: 1000000
hard: 1000000
ports:
- "8080:8080"
volumes:
- ./tmp/mnesia-data:/app/mnesia-data
# - mnesia-volume:/app/mnesia-data
environment:
- NODE_NAME=diogenes
- NODE_TYPE=slave
- BOOTSTRAP_NODE=alexander@api02
- ERL_MAX_PORTS=2048
- RELEASE_DISTRIBUTION=sname
- RELEASE_NODE=diogenes@api01
- RELEASE_COOKIE=somecookie
command: /app/_build/PROD/rel/rinha2/bin/rinha2 start
# command: sleep infinity
deploy:
resources:
limits:
cpus: '0.6'
memory: '250MB'
api02:
<<: *api
container_name: api02
hostname: api02
depends_on:
- api01
ports:
- "8081:8080"
environment:
- NODE_NAME=alexander
- BOOTSTRAP_NODE=diogenes@api01
- ERL_MAX_PORTS=2048
- NODE_TYPE=master
- RELEASE_DISTRIBUTION=sname
- RELEASE_NODE=alexander@api02
- RELEASE_COOKIE=somecookie
nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api01
- api02
ports:
- "9999:9999"
deploy:
resources:
limits:
cpus: '0.3'
memory: '50MB'
# volumes:
# mnesia-volume: