-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.subordinates.example
More file actions
292 lines (234 loc) · 9.53 KB
/
.env.subordinates.example
File metadata and controls
292 lines (234 loc) · 9.53 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# ============================================================================
# Vértice Platform - Subordinate Services Environment Variables
# PENELOPE + MABA + MVP Configuration
# ============================================================================
#
# Constitutional Authority: Constituição Vértice v3.0
# Biblical Foundation: 7 Articles of Governance
#
# Usage:
# 1. Copy this file to .env.subordinates
# 2. Fill in the required values (marked with !!!)
# 3. Source: source .env.subordinates
# 4. Run: docker-compose -f docker-compose.subordinates.yml up -d
#
# Validated: 2025-10-31
# Services: PENELOPE (8154), MABA (8152), MVP (8153)
# ============================================================================
# REQUIRED VARIABLES (Must be set)
# ============================================================================
# Anthropic API Key (Claude LLM) - REQUIRED for all services
# Get yours at: https://console.anthropic.com/
ANTHROPIC_API_KEY=sk-ant-api03-... # !!! REQUIRED !!!
# ============================================================================
# OPTIONAL VARIABLES (Have sensible defaults)
# ============================================================================
# Environment Configuration
ENVIRONMENT=development
LOG_LEVEL=INFO
# MAXIMUS Core Integration
# Set this if MAXIMUS Core is running on a different host
MAXIMUS_ENDPOINT=http://vertice-maximus-core-service:8150
# Service Registry (for service discovery and health checks)
VERTICE_REGISTRY_URL=http://vertice-register-lb:80
VERTICE_REGISTRY_TOKEN=titanium-registry-token
# ============================================================================
# MVP SERVICE - Optional External Services
# ============================================================================
# ElevenLabs API (Text-to-Speech for audio narratives)
# Get yours at: https://elevenlabs.io/
# Note: MVP works without this, but audio features will be disabled
ELEVENLABS_API_KEY=your_elevenlabs_api_key_here # Optional
TTS_VOICE_ID=marcus # Voice ID from ElevenLabs
# Azure Blob Storage (for audio file storage)
# Required only if you want to store generated audio narratives
AZURE_STORAGE_ACCOUNT=your_storage_account # Optional
AZURE_STORAGE_KEY=your_storage_key # Optional
# ============================================================================
# DATABASE CONFIGURATION (Default values work with docker-compose)
# ============================================================================
# PostgreSQL (shared by all services)
POSTGRES_HOST=vertice-postgres
POSTGRES_PORT=5432
POSTGRES_DB=vertice
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
# Redis (shared cache and rate limiting)
REDIS_HOST=vertice-redis
REDIS_PORT=6379
# Neo4j (MABA cognitive map)
NEO4J_URI=bolt://vertice-neo4j:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=vertice-neo4j-password
# Prometheus (MVP metrics)
PROMETHEUS_URL=http://vertice-prometheus:9090
# Loki (PENELOPE logs)
LOKI_URL=http://vertice-loki:3100
# ============================================================================
# PENELOPE CONFIGURATION - 7 Biblical Articles
# ============================================================================
# Artigo I - Sophia (Wisdom)
SOPHIA_ENABLED=true
WISDOM_BASE_MIN_CASES=5
TRANSIENT_FAILURE_WINDOW_MINUTES=15
INTERVENTION_RISK_THRESHOLD=0.70
# Artigo II - Praótes (Gentleness/Meekness)
PRAOTES_ENABLED=true
MAX_PATCH_LINES=25
MIN_REVERSIBILITY_SCORE=0.90
MAX_FUNCTIONS_MODIFIED=3
MIN_MANSIDAO_SCORE=0.70
# Artigo III - Tapeinophrosynē (Humility)
TAPEINOPHROSYNE_ENABLED=true
CONFIDENCE_THRESHOLD=0.85
ESCALATION_ENABLED=true
LEARNING_FROM_FAILURE_ENABLED=true
# Artigo IV - Stewardship (Mordomia)
STEWARDSHIP_ENABLED=true
PRESERVE_DEVELOPER_INTENT=true
RESPECT_CODE_STYLE=true
# Artigo V - Agape (Love)
AGAPE_ENABLED=true
SERVICE_WITH_GENTLENESS=true
# Artigo VI - Sabbath (Rest)
SABBATH_ENABLED=true
SABBATH_DAY=sunday # Options: sunday, saturday
SABBATH_TIMEZONE=UTC
SABBATH_ALLOW_P0_CRITICAL=true
# Artigo VII - Aletheia (Truth)
ALETHEIA_ENABLED=true
RADICAL_HONESTY=true
DECLARE_UNCERTAINTY=true
# Digital Twin Configuration
DIGITAL_TWIN_ENABLED=true
DIGITAL_TWIN_VALIDATION_MINUTES=15
DIGITAL_TWIN_TIMEOUT_SECONDS=900
# ============================================================================
# MABA CONFIGURATION - Browser Automation
# ============================================================================
# Browser Configuration (Playwright)
BROWSER_TYPE=chromium # Options: chromium, firefox, webkit
BROWSER_HEADLESS=true
BROWSER_TIMEOUT=30000
MAX_BROWSER_INSTANCES=5
BROWSER_POOL_SIZE=3
# Cognitive Map Configuration
COGNITIVE_MAP_MAX_PAGES=10000
MAX_DOM_ELEMENTS=500
LEARNING_RATE=0.01
MIN_ELEMENT_IMPORTANCE=0.3
# ============================================================================
# MVP CONFIGURATION - Narrative Intelligence
# ============================================================================
# Narrative Generation
NARRATIVE_TARGET_DURATION=30 # seconds
NARRATIVE_WORD_COUNT_TARGET=250
MIN_NQS_SCORE=85 # Narrative Quality Score (0-100)
MIN_AQS_SCORE=90 # Audio Quality Score (0-100)
ENABLE_AUDIO_CACHE=true
MAX_COST_PER_NARRATIVE_USD=0.50
# Content Moderation
ENABLE_PII_DETECTION=true
ENABLE_PROFANITY_FILTER=true
ENABLE_LGPD_COMPLIANCE=true # Brazilian data protection law
# LLM Configuration (Anthropic Claude)
LLM_MODEL=claude-sonnet-4-5-20250929
LLM_MAX_TOKENS=2000 # MVP uses shorter narratives
LLM_TEMPERATURE=0.7 # Higher temperature for creative narratives
# ============================================================================
# PERFORMANCE & RESOURCE LIMITS
# ============================================================================
# Request Timeouts
PENELOPE_REQUEST_TIMEOUT=300 # 5 minutes (code analysis is slow)
MABA_REQUEST_TIMEOUT=300 # 5 minutes (browser automation)
MVP_REQUEST_TIMEOUT=120 # 2 minutes (narrative generation)
# Worker Processes
WORKER_PROCESSES=1 # Increase for production (e.g., 4)
# Security
SANDBOX_ENABLED=true
MAX_PATCH_ATTEMPTS_PER_HOUR=10
# ============================================================================
# DOCKER RESOURCE LIMITS (override in docker-compose if needed)
# ============================================================================
# PENELOPE Resources
# CPU: 0.5-2.0 cores
# Memory: 512M-2G
# MABA Resources (browser automation is resource-intensive)
# CPU: 1.0-2.0 cores
# Memory: 2G-4G
# MVP Resources
# CPU: 0.25-1.0 cores
# Memory: 256M-1G
# ============================================================================
# MONITORING & OBSERVABILITY
# ============================================================================
# Prometheus Metrics Ports
PENELOPE_METRICS_PORT=9094
MABA_METRICS_PORT=9092
MVP_METRICS_PORT=9093
PROMETHEUS_PORT=9090
# Logging
LOKI_PORT=3100
# Neo4j UI
NEO4J_HTTP_PORT=7474
NEO4J_BOLT_PORT=7687
# ============================================================================
# NETWORK CONFIGURATION
# ============================================================================
# Service Ports (if you need to change from defaults)
PENELOPE_PORT=8154
MABA_PORT=8152
MVP_PORT=8153
# Infrastructure Ports
POSTGRES_PORT=5432
REDIS_PORT=6379
# ============================================================================
# NOTES & BEST PRACTICES
# ============================================================================
# 1. ANTHROPIC_API_KEY is the only truly required variable
# 2. Default values are optimized for development (docker-compose)
# 3. For production, consider:
# - Increasing WORKER_PROCESSES
# - Using managed PostgreSQL (AWS RDS, Google Cloud SQL)
# - Using Redis Cluster for high availability
# - Setting up proper monitoring with Grafana
# 4. All 7 Biblical Articles are enabled by default for PENELOPE
# 5. MABA requires Docker with --cap-add SYS_ADMIN for browser automation
# 6. MVP can work without ElevenLabs, but audio features will be disabled
# ============================================================================
# TROUBLESHOOTING
# ============================================================================
# If services fail to start:
# 1. Check docker-compose logs: docker-compose -f docker-compose.subordinates.yml logs
# 2. Verify ANTHROPIC_API_KEY is set correctly
# 3. Ensure ports are not already in use: netstat -tuln | grep 8152
# 4. Check database migrations ran: docker-compose exec penelope psql -U postgres -d vertice
# 5. Verify Neo4j is healthy: docker-compose exec neo4j cypher-shell -u neo4j -p vertice-neo4j-password
# Health check endpoints:
# http://localhost:8154/health # PENELOPE
# http://localhost:8152/health # MABA
# http://localhost:8153/health # MVP
# API documentation (Swagger):
# http://localhost:8154/docs # PENELOPE
# http://localhost:8152/docs # MABA
# http://localhost:8153/docs # MVP
# Prometheus metrics:
# http://localhost:9094/metrics # PENELOPE
# http://localhost:9092/metrics # MABA
# http://localhost:9093/metrics # MVP
# http://localhost:9090 # Prometheus UI
# Neo4j Browser (MABA cognitive map):
# http://localhost:7474
# Username: neo4j
# Password: vertice-neo4j-password
# ============================================================================
# SUPPORT & DOCUMENTATION
# ============================================================================
# Repository: https://github.com/your-org/vertice-platform
# Documentation: /docs/DEPLOYMENT.md
# Validation Report: /VALIDATION_SUMMARY_2025-10-31.md
# Air Gap Report: /backend/services/FASE6_AIR_GAP_COMPLIANCE_REPORT.md
# Biblical Foundation:
# "Tudo quanto te vier à mão para fazer, faze-o conforme as tuas forças."
# — Eclesiastes 9:10
# Soli Deo Gloria 🙏