-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yml
90 lines (83 loc) · 1.74 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
83
84
85
86
87
88
89
90
version: '3.5'
services:
nginx:
hostname: api
image: nginx:latest
user: "root:root"
volumes:
- unix_socket:/var/run:z
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- shinigami
- hollow
ports:
- "9999:9999"
deploy:
resources:
limits:
cpus: '0.2'
memory: '70MB'
db:
image: postgres:latest
hostname: db
env_file:
- ./.env
volumes:
- unix_socket:/var/run
- ./postgresql.conf/:/docker-entrypoint-initdb.d/postgresql.conf
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin -d rinha_back"]
interval: 15s
timeout: 20s
command:
[
"postgres", "-c", "config_file=/docker-entrypoint-initdb.d/postgresql.conf",
]
deploy:
resources:
limits:
cpus: '1'
memory: '360MB'
shinigami:
container_name: shinigami
image: raissageek/rinha_backend:v2
volumes:
- unix_socket:/var/run/
environment:
- UNIX_SOCK_PATH=/var/run/unix_shinigami.sock
depends_on:
- db
tty: true
stdin_open: true
restart: always
deploy:
resources:
limits:
cpus: '0.15'
memory: '60MB'
hollow:
container_name: hollow
image: raissageek/rinha_backend:v2
depends_on:
- db
volumes:
- unix_socket:/var/run/
environment:
- UNIX_SOCK_PATH=/var/run/unix_hollow.sock
tty: true
stdin_open: true
restart: always
deploy:
resources:
limits:
cpus: '0.15'
memory: '60MB'
networks:
default:
driver: bridge
name: rinha-back
volumes:
unix_socket: