-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
77 lines (71 loc) · 1.5 KB
/
docker-compose.yml
File metadata and controls
77 lines (71 loc) · 1.5 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:
db:
image: postgres:16-alpine
restart: always
environment:
POSTGRES_USER: scanuser
POSTGRES_PASSWORD: scanpass
POSTGRES_DB: scandb
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
scanner:
build:
context: .
dockerfile: Dockerfile.scanner
restart: always
environment:
FLASK_ENV: production
PYTHONUNBUFFERED: 1
ports:
- "5001:5001"
volumes:
- .:/app
- scanner-data:/app/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
backend:
build: .
depends_on:
- db
- scanner
environment:
DATABASE_URL: postgres://scanuser:scanpass@db:5432/scandb
SCANNER_API_URL: http://scanner:5001
PORT: 5000
NODE_ENV: production
ports:
- "5000:5000"
volumes:
- .:/app
- /app/node_modules
redis:
image: redis:7-alpine
restart: always
ports:
- "6379:6379"
volumes:
- redis-data:/data
prometheus:
image: prom/prometheus:latest
restart: always
ports:
- "9090:9090"
volumes:
- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
depends_on:
- backend
- scanner
volumes:
pgdata:
scanner-data:
redis-data:
prometheus-data: