@ruvector/edge-net 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,162 @@
1
+ # @ruvector/edge-net Genesis Node - Docker Compose Configuration
2
+ #
3
+ # Local development and testing configuration.
4
+ # For production, consider using Kubernetes or managed container services.
5
+ #
6
+ # Usage:
7
+ # docker-compose -f deploy/docker-compose.yml up -d
8
+ # docker-compose -f deploy/docker-compose.yml logs -f genesis
9
+ # docker-compose -f deploy/docker-compose.yml down
10
+ #
11
+ # Test cluster:
12
+ # docker-compose -f deploy/docker-compose.yml --profile cluster up -d
13
+
14
+ version: '3.8'
15
+
16
+ services:
17
+ # ============================================
18
+ # Primary Genesis Node
19
+ # ============================================
20
+ genesis:
21
+ build:
22
+ context: ..
23
+ dockerfile: deploy/Dockerfile
24
+ image: ruvector/edge-net-genesis:latest
25
+ container_name: edge-net-genesis
26
+ restart: unless-stopped
27
+ ports:
28
+ - "8787:8787" # WebSocket signaling
29
+ - "8788:8788" # Health check / metrics
30
+ volumes:
31
+ - genesis-data:/data/genesis
32
+ environment:
33
+ - NODE_ENV=production
34
+ - GENESIS_PORT=8787
35
+ - GENESIS_HOST=0.0.0.0
36
+ - HEALTH_PORT=8788
37
+ - GENESIS_DATA=/data/genesis
38
+ - LOG_FORMAT=json
39
+ - LOG_LEVEL=info
40
+ - METRICS_ENABLED=true
41
+ # Firebase (optional - uncomment and set values)
42
+ # - FIREBASE_API_KEY=${FIREBASE_API_KEY}
43
+ # - FIREBASE_PROJECT_ID=${FIREBASE_PROJECT_ID}
44
+ healthcheck:
45
+ test: ["CMD", "curl", "-f", "http://localhost:8788/health"]
46
+ interval: 30s
47
+ timeout: 10s
48
+ retries: 3
49
+ start_period: 10s
50
+ networks:
51
+ - edge-net
52
+ logging:
53
+ driver: "json-file"
54
+ options:
55
+ max-size: "10m"
56
+ max-file: "3"
57
+
58
+ # ============================================
59
+ # Secondary Genesis Node (cluster profile)
60
+ # ============================================
61
+ genesis-2:
62
+ build:
63
+ context: ..
64
+ dockerfile: deploy/Dockerfile
65
+ image: ruvector/edge-net-genesis:latest
66
+ container_name: edge-net-genesis-2
67
+ restart: unless-stopped
68
+ profiles:
69
+ - cluster
70
+ ports:
71
+ - "8789:8787" # WebSocket signaling
72
+ - "8790:8788" # Health check / metrics
73
+ volumes:
74
+ - genesis-2-data:/data/genesis
75
+ environment:
76
+ - NODE_ENV=production
77
+ - GENESIS_PORT=8787
78
+ - GENESIS_HOST=0.0.0.0
79
+ - HEALTH_PORT=8788
80
+ - GENESIS_DATA=/data/genesis
81
+ - LOG_FORMAT=json
82
+ - LOG_LEVEL=info
83
+ - METRICS_ENABLED=true
84
+ healthcheck:
85
+ test: ["CMD", "curl", "-f", "http://localhost:8788/health"]
86
+ interval: 30s
87
+ timeout: 10s
88
+ retries: 3
89
+ start_period: 10s
90
+ networks:
91
+ - edge-net
92
+ depends_on:
93
+ - genesis
94
+
95
+ # ============================================
96
+ # Prometheus (monitoring profile)
97
+ # ============================================
98
+ prometheus:
99
+ image: prom/prometheus:v2.48.0
100
+ container_name: edge-net-prometheus
101
+ restart: unless-stopped
102
+ profiles:
103
+ - monitoring
104
+ ports:
105
+ - "9090:9090"
106
+ volumes:
107
+ - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
108
+ - prometheus-data:/prometheus
109
+ command:
110
+ - '--config.file=/etc/prometheus/prometheus.yml'
111
+ - '--storage.tsdb.path=/prometheus'
112
+ - '--web.console.libraries=/usr/share/prometheus/console_libraries'
113
+ - '--web.console.templates=/usr/share/prometheus/consoles'
114
+ networks:
115
+ - edge-net
116
+ depends_on:
117
+ - genesis
118
+
119
+ # ============================================
120
+ # Grafana (monitoring profile)
121
+ # ============================================
122
+ grafana:
123
+ image: grafana/grafana:10.2.0
124
+ container_name: edge-net-grafana
125
+ restart: unless-stopped
126
+ profiles:
127
+ - monitoring
128
+ ports:
129
+ - "3000:3000"
130
+ volumes:
131
+ - grafana-data:/var/lib/grafana
132
+ environment:
133
+ - GF_SECURITY_ADMIN_USER=admin
134
+ - GF_SECURITY_ADMIN_PASSWORD=edgenet
135
+ - GF_USERS_ALLOW_SIGN_UP=false
136
+ networks:
137
+ - edge-net
138
+ depends_on:
139
+ - prometheus
140
+
141
+ # ============================================
142
+ # Networks
143
+ # ============================================
144
+ networks:
145
+ edge-net:
146
+ driver: bridge
147
+ ipam:
148
+ config:
149
+ - subnet: 172.28.0.0/16
150
+
151
+ # ============================================
152
+ # Volumes
153
+ # ============================================
154
+ volumes:
155
+ genesis-data:
156
+ driver: local
157
+ genesis-2-data:
158
+ driver: local
159
+ prometheus-data:
160
+ driver: local
161
+ grafana-data:
162
+ driver: local