-
Notifications
You must be signed in to change notification settings - Fork 77
/
docker-compose.yml
74 lines (74 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
version: '3'
services:
web:
restart: always
build:
context: .
dockerfile: deploy/docker/web.Dockerfile
ports:
- "80:5000"
depends_on:
redis:
condition: service_started
postgres:
condition: service_healthy
volumes:
- "${SAMPLES_DIR}:/mnt/samples"
environment:
- "REDIS_HOST=redis"
- "MQUERY_BACKEND=tcp://ursadb:9281"
- "DATABASE_URL=postgresql://postgres:password@postgres:5432/mquery"
healthcheck:
test: ["CMD-SHELL", "curl --fail http://localhost:5000/api/server || exit 1"]
interval: 5s
timeout: 5s
retries: 30
daemon:
restart: always
build:
context: .
dockerfile: deploy/docker/daemon.Dockerfile
links:
- redis
- ursadb
- postgres
volumes:
- "${SAMPLES_DIR}:/mnt/samples"
depends_on:
web:
condition: service_healthy
redis:
condition: service_started
ursadb:
condition: service_started
postgres:
condition: service_healthy
environment:
- "REDIS_HOST=redis"
- "MQUERY_BACKEND=tcp://ursadb:9281"
- "DATABASE_URL=postgresql://postgres:password@postgres:5432/mquery"
ursadb:
restart: always
image: mqueryci/ursadb:v1.5.1
ports:
- "127.0.0.1:9281:9281"
volumes:
- "${SAMPLES_DIR}:/mnt/samples"
- "${INDEX_DIR}:/var/lib/ursadb"
user: "0:0"
redis:
restart: always
image: redis
postgres:
image: postgres
restart: always
volumes:
- ${POSTGRES_DIR}:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_DB=mquery
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5