-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathdocker-compose.yml
75 lines (72 loc) · 1.94 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
version: "3.4"
x-restart-policy: &restart_policy
restart: unless-stopped
x-opencve-defaults: &opencve_defaults
<<: *restart_policy
image: opencve:${OPENCVE_VERSION}
volumes:
- ${OPENCVE_CONFIG_PATH}:/app/opencve.cfg:ro
services:
webserver:
<<: *opencve_defaults
container_name: webserver
build:
context: .
args:
- OPENCVE_REPOSITORY=${OPENCVE_REPOSITORY}
- OPENCVE_VERSION=${OPENCVE_VERSION}
- HTTP_PROXY=${HTTP_PROXY:-}
- HTTPS_PROXY=${HTTPS_PROXY:-}
dockerfile: Dockerfile
depends_on:
- postgres
command: webserver -b 0.0.0.0:8000
networks:
- backend
ports:
- ${OPENCVE_PORT:-8000}:8000
celery_beat:
<<: *opencve_defaults
container_name: celery_beat
depends_on:
- webserver
- redis
command: celery-beat
networks:
- backend
celery_worker:
<<: *opencve_defaults
container_name: celery_worker
depends_on:
- webserver
- redis
command: celery-worker
networks:
- backend
redis:
<<: *restart_policy
container_name: redis
image: redis:buster
networks:
- backend
ports:
- 127.0.0.1:${REDIS_PORT:-6379}:6379
postgres:
<<: *restart_policy
container_name: postgres
image: postgres:11
environment:
POSTGRES_USER: ${POSTGRES_USER:-opencve}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-opencve}
POSTGRES_DB: opencve
PGDATA: /var/lib/postgresql/data
networks:
- backend
ports:
- 127.0.0.1:${POSTGRES_PORT:-5432}:5432
volumes:
- postgres:/var/lib/postgresql/data
networks:
backend:
volumes:
postgres: