-
Notifications
You must be signed in to change notification settings - Fork 36
/
docker-compose.yml
93 lines (86 loc) · 1.86 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
91
92
93
name: "Cve-Search docker version"
services:
cve_search:
image: cve_search
build:
context: .
dockerfile: docker/images/cve_search/dockerfile-cve_search
args:
- REPO=cve-search/cve-search
- BRANCH=master
hostname: cve_search
depends_on:
redis:
condition: service_healthy
mongo:
condition: service_healthy
restart: always
environment:
- PYTHONUNBUFFERED=TRUE
- WORKER_SIZE=1
- MONGODB_HOST=mongo
ports:
- '443:5000'
networks:
- frontend
- backend
healthcheck:
test: curl --fail https://localhost:5000 -k || exit 1
interval: 30s
timeout: 5s
retries: 1
start_period: 5s
redis:
image: cve_search-redis
hostname: redis
restart: always
build:
context: .
dockerfile: docker/images/redis/dockerfile-redis
volumes:
- redis_data:/data
expose:
- 6379
networks:
- backend
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 30s
timeout: 5s
retries: 1
start_period: 30s
mongo:
image: cve_search-mongo
hostname: mongo
restart: always
build:
context: .
dockerfile: docker/images/mongodb/dockerfile-mongo
volumes:
- mongodb_data:/data/db
expose:
- 27017
networks:
- backend
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 30s
timeout: 5s
retries: 10
start_period: 10s
autoheal:
image: willfarrell/autoheal:latest
hostname: autoheal
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- AUTOHEAL_CONTAINER_LABEL=all
networks:
- backend
networks:
frontend:
backend:
volumes:
mongodb_data:
redis_data: