-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
77 lines (60 loc) · 2.26 KB
/
docker-compose.yml
File metadata and controls
77 lines (60 loc) · 2.26 KB
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
services:
#--------------------------------------------------------------------------
# Database service
#--------------------------------------------------------------------------
fastcve-db:
image: "${FASTCVE_DB_IMAGE:-postgres:16-alpine3.19}"
container_name: fastcve-db
environment:
- POSTGRES_USER=${FCDB_USER}
- POSTGRES_PASSWORD=${FCDB_PASS}
- POSTGRES_DB=vuln_db
volumes:
- vol_fastcve_db:/var/lib/postgresql/data
- ./backup:/backup
ports:
- "6630:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"]
interval: 5s
timeout: 3s
retries: 10
networks:
backend:
aliases:
- fastcve-db
#--------------------------------------------------------------------------
# FastCVE application (API + CLI)
#--------------------------------------------------------------------------
fastcve:
image: "${FASTCVE_DOCKER_IMG}:${FASTCVE_DOCKER_TAG}"
container_name: fastcve
build:
context: $PWD
dockerfile: $PWD/Dockerfile
args:
APP_VERSION: ${FASTCVE_DOCKER_TAG:-notset}
depends_on:
fastcve-db:
condition: service_healthy
environment:
- INP_ENV_NAME=${INP_ENV_NAME:-dev}
- FCDB_USER=${FCDB_USER}
- FCDB_PASS=${FCDB_PASS}
- FCDB_WEB_PARAMS=--host 0.0.0.0 --port 8000 --workers 4
- NVD_API_KEY=${NVD_API_KEY}
command: ["/bin/sh", "-c", "python -m web.prestart && exec uvicorn web.app:app $$FCDB_WEB_PARAMS"]
ports:
- "8000:8000"
networks:
- backend
#------------------------------------------------------------------------------
# Definition of networks used
#------------------------------------------------------------------------------
networks:
backend:
#------------------------------------------------------------------------------
# Definition of docker volumes
#------------------------------------------------------------------------------
volumes:
vol_fastcve_db: # DB data for the vuln DB