-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
119 lines (111 loc) · 3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
119 lines (111 loc) · 3 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
version: '3.8'
services:
frontend:
build: ./frontend
ports:
- "3000:3000"
environment:
- NEXT_PUBLIC_API_URL=http://localhost:8000
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
backend:
build: ./backend
ports:
- "8000:8000"
environment:
- DATABASE_URL=postgresql://sentinel:sentinel@db:5432/sentinel
- REDIS_URL=redis://redis:6379/0
- OTX_API_KEY=${OTX_API_KEY:-}
- ABUSEIPDB_API_KEY=${ABUSEIPDB_API_KEY:-}
- VT_API_KEY=${VT_API_KEY:-}
- SHODAN_API_KEY=${SHODAN_API_KEY:-}
- PHISHTANK_API_KEY=${PHISHTANK_API_KEY:-}
- GROQ_API_KEY=${GROQ_API_KEY:-}
- SECRET_KEY=${SECRET_KEY:-change-me-in-production}
- ENVIRONMENT=${ENVIRONMENT:-development}
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- FEED_SYNC_INTERVAL=${FEED_SYNC_INTERVAL:-3600}
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
restart: unless-stopped
celery-worker:
build: ./backend
command: celery -A app.tasks.celery_app worker -l info -c 4
environment:
- DATABASE_URL=postgresql://sentinel:sentinel@db:5432/sentinel
- REDIS_URL=redis://redis:6379/0
- OTX_API_KEY=${OTX_API_KEY:-}
- ABUSEIPDB_API_KEY=${ABUSEIPDB_API_KEY:-}
- VT_API_KEY=${VT_API_KEY:-}
- SHODAN_API_KEY=${SHODAN_API_KEY:-}
- GROQ_API_KEY=${GROQ_API_KEY:-}
- SECRET_KEY=${SECRET_KEY:-change-me-in-production}
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
celery-beat:
build: ./backend
command: celery -A app.tasks.celery_app beat -l info
environment:
- DATABASE_URL=postgresql://sentinel:sentinel@db:5432/sentinel
- REDIS_URL=redis://redis:6379/0
- SECRET_KEY=${SECRET_KEY:-change-me-in-production}
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
db:
image: postgres:16-alpine
environment:
- POSTGRES_USER=sentinel
- POSTGRES_PASSWORD=sentinel
- POSTGRES_DB=sentinel
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U sentinel"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
nginx:
image: nginx:alpine
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- frontend
- backend
restart: unless-stopped
volumes:
postgres_data:
redis_data: