-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
145 lines (138 loc) · 3.7 KB
/
docker-compose.yml
File metadata and controls
145 lines (138 loc) · 3.7 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# Snort3-AI-Ops Production Docker Compose
# Complete stack with all 5 agents, API server, and supporting services
services:
# Redis - for caching and pub/sub messaging
redis:
image: redis:7-alpine
container_name: snort3-redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
networks:
- snort-ai-ops
# PostgreSQL - for persistent storage
postgres:
image: postgres:15-alpine
container_name: snort3-postgres
environment:
POSTGRES_DB: aiops
POSTGRES_USER: aiops
POSTGRES_PASSWORD: aiops_password
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./docker/init-db.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U aiops"]
interval: 10s
timeout: 3s
retries: 3
networks:
- snort-ai-ops
# AI-Ops Engine with all 5 agents
aiops-engine:
build:
context: .
dockerfile: docker/Dockerfile
container_name: snort3-aiops-engine
environment:
- PYTHONUNBUFFERED=1
- REDIS_URL=redis://redis:6379
- POSTGRES_URL=postgresql://aiops:aiops_password@postgres:5432/aiops
- ZMQ_ENDPOINT=tcp://0.0.0.0:5555
- LOG_LEVEL=INFO
- ENABLE_ALL_AGENTS=true
- OPENAI_API_KEY=${OPENAI_API_KEY:-sk-demo-key-for-testing}
- VIRUSTOTAL_API_KEY=${VIRUSTOTAL_API_KEY:-demo_key}
- ABUSEIPDB_API_KEY=${ABUSEIPDB_API_KEY:-demo_key}
ports:
- "5555:5555" # ZeroMQ event stream
- "9090:9090" # Metrics
volumes:
- ./config:/app/config
- ./core:/app/core
- ./agents:/app/agents
- ./main.py:/app/main.py
- ./examples:/app/examples
- aiops-data:/app/data
- aiops-logs:/app/logs
command: python main.py start --config config/config.yaml
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "python", "-c", "import zmq; print('ok')"]
interval: 30s
timeout: 10s
retries: 3
networks:
- snort-ai-ops
restart: unless-stopped
# API Server and Dashboard
api-server:
build:
context: .
dockerfile: docker/Dockerfile
container_name: snort3-api-server
environment:
- PYTHONUNBUFFERED=1
- REDIS_URL=redis://redis:6379
- POSTGRES_URL=postgresql://aiops:aiops_password@postgres:5432/aiops
- ENGINE_ENDPOINT=tcp://aiops-engine:5555
- HOST=0.0.0.0
- PORT=8080
ports:
- "8080:8080"
volumes:
- ./api_server.py:/app/api_server.py
- ./core:/app/core
command: python api_server.py
depends_on:
- redis
- postgres
- aiops-engine
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8080/api/v1/health')"]
interval: 30s
timeout: 10s
retries: 3
networks:
- snort-ai-ops
restart: unless-stopped
# Event Simulator - generates test events
event-simulator:
build:
context: .
dockerfile: docker/Dockerfile
container_name: snort3-event-simulator
environment:
- PYTHONUNBUFFERED=1
- ZMQ_ENDPOINT=tcp://aiops-engine:5555
- EVENTS_PER_SECOND=10
volumes:
- ./examples:/app/examples
command: python examples/apt_detection_demo.py
depends_on:
- aiops-engine
networks:
- snort-ai-ops
restart: unless-stopped
profiles:
- demo # Only start with --profile demo
networks:
snort-ai-ops:
driver: bridge
volumes:
redis-data:
postgres-data:
aiops-data:
aiops-logs: