Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
132 lines (126 loc) · 4.1 KB
/
Copy pathdocker-compose.yml
File metadata and controls
132 lines (126 loc) · 4.1 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
# =============================================================================
# NetworkOps - AI-Powered Network Automation
# =============================================================================
# Full stack deployment with Dashboard, API, and MCP Server
#
# Quick Start:
# 1. cp .env.example .env
# 2. Edit .env with your credentials
# 3. docker-compose up -d
# 4. Open http://localhost:3000
#
# NOTE: On macOS, Docker containers cannot reach EVE-NG/Multipass VMs directly.
# For full lab connectivity, run the API natively instead:
# cd dashboard && python api_server.py
# =============================================================================
services:
# ---------------------------------------------------------------------------
# Dashboard API Server
# Flask + Gunicorn + WebSocket support
# ---------------------------------------------------------------------------
api:
build:
context: .
dockerfile: docker/Dockerfile.api
container_name: networkops-api
ports:
- "5001:5001"
env_file:
- .env
environment:
- SOCKETIO_ASYNC_MODE=gevent
- FLASK_ENV=production
- DASHBOARD_ORIGIN=http://localhost:3000
- DEMO_MODE=${DEMO_MODE:-false}
volumes:
- ./data:/app/data
- ./baselines:/app/baselines
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5001/health/live"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
restart: unless-stopped
networks:
- networkops
# ---------------------------------------------------------------------------
# Dashboard Frontend
# React + Nginx reverse proxy
# ---------------------------------------------------------------------------
frontend:
build:
context: ./dashboard
dockerfile: Dockerfile.frontend
args:
REACT_APP_API_URL: ""
REACT_APP_WS_URL: ""
container_name: networkops-frontend
ports:
- "3000:80"
depends_on:
api:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:80/"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
networks:
- networkops
# ---------------------------------------------------------------------------
# MDT Collector (optional - set MDT_EXTERNAL=true on api to use)
# Standalone gRPC telemetry collector, publishes via Redis pub/sub
# ---------------------------------------------------------------------------
mdt-collector:
build:
context: .
dockerfile: dashboard/Dockerfile.api
container_name: networkops-mdt-collector
command: python dashboard/run_mdt_collector.py
ports:
- "57000:57000"
env_file:
- .env
profiles:
- mdt-external
restart: unless-stopped
networks:
- networkops
# ---------------------------------------------------------------------------
# MCP Server
# AI-powered network automation tools for Claude Code
# ---------------------------------------------------------------------------
mcp-server:
build:
context: .
dockerfile: docker/Dockerfile.mcp
container_name: networkops-mcp
env_file:
- .env
environment:
- MEMORY_ENABLE_SEMANTIC=true
- MEMORY_AUTO_PRUNE=true
volumes:
- ./data:/app/data
- ./baselines:/app/baselines
# MCP uses stdio, not HTTP - no ports exposed
# This container is for building/testing the MCP server
# In production, Claude Code invokes the MCP server directly
restart: "no"
networks:
- networkops
# =============================================================================
# Networks
# =============================================================================
networks:
networkops:
name: networkops-network
driver: bridge
# =============================================================================
# Named Volumes (optional - use bind mounts above for easier access)
# =============================================================================
# volumes:
# networkops-data:
# networkops-baselines: