-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
128 lines (122 loc) · 3.99 KB
/
docker-compose.yml
File metadata and controls
128 lines (122 loc) · 3.99 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
# ============================================================================
# ShadowHunter — Docker Compose Configuration
# ============================================================================
# One-click deployment: docker-compose up -d
#
# Brings up:
# - ShadowHunter API (port 8000)
# - Neo4j Graph Database (7474 HTTP, 7687 Bolt) — required for ingestion/graph
# - Redis (6379)
# - Tor proxy (9050 SOCKS)
#
# After start: API at http://localhost:8000, Neo4j Browser at http://localhost:7474
# Default Neo4j auth: neo4j / shadowhunter (set NEO4J_AUTH to override)
# ============================================================================
services:
# ==========================================================================
# ShadowHunter API Server
# ==========================================================================
shadowhunter-api:
build:
context: .
dockerfile: Dockerfile
container_name: shadowhunter-api
ports:
- "8000:8000" # API + /metrics for Prometheus scraping
environment:
- LOG_LEVEL=info
- NEO4J_URI=bolt://neo4j:7687
- NEO4J_USER=neo4j
- NEO4J_PASSWORD=shadowhunter
- REDIS_URL=redis://redis:6379
- TOR_PROXY_HOST=tor
- TOR_PROXY_PORT=9050
volumes:
- ./logs:/app/logs
- ./data:/app/data
depends_on:
neo4j:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
restart: unless-stopped
networks:
- shadowhunter-net
# ==========================================================================
# Neo4j Graph Database (one-click graph store for ingestion & analytics)
# ==========================================================================
neo4j:
image: neo4j:5.16-community
container_name: shadowhunter-neo4j
ports:
- "7474:7474" # HTTP (Browser UI)
- "7687:7687" # Bolt (driver)
environment:
- NEO4J_AUTH=neo4j/shadowhunter
- NEO4J_PLUGINS=["apoc"]
- NEO4J_dbms_memory_heap_initial__size=512m
- NEO4J_dbms_memory_heap_max__size=2g
volumes:
- neo4j-data:/data
- neo4j-logs:/logs
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:7474"] # Neo4j image has wget
interval: 15s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
networks:
- shadowhunter-net
# ==========================================================================
# Redis Cache
# ==========================================================================
redis:
image: redis:7-alpine
container_name: shadowhunter-redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
restart: unless-stopped
networks:
- shadowhunter-net
# ==========================================================================
# Tor Proxy (for dark web access)
# ==========================================================================
tor:
image: dperson/torproxy:latest
container_name: shadowhunter-tor
ports:
- "9050:9050" # SOCKS proxy
- "9051:9051" # Control port
environment:
- TOR_NewCircuitPeriod=30
- TOR_MaxCircuitDirtiness=600
restart: unless-stopped
networks:
- shadowhunter-net
# ==========================================================================
# Volumes
# ==========================================================================
volumes:
neo4j-data:
neo4j-logs:
redis-data:
# ==========================================================================
# Networks
# ==========================================================================
networks:
shadowhunter-net:
driver: bridge