feat: Phase LIVE integration - Production automation and deployment fixes

## Railway Deployment Fixes
- Fix railway.toml startCommand (remove incorrect 'cd backend')
- Enhance Dockerfile with security, health checks, and proper user permissions
- Add comprehensive deployment fix documentation (RAILWAY_DEPLOY_FIX.md)

## Phase Q/Q2 Integration
- Add GitHub webhooks router (/api/webhooks/github) for PR automation
- Integrate Prism Console at /prism endpoint
- Add GITHUB_TOKEN and GITHUB_WEBHOOK_SECRET to config
- Update .env.example with webhook secret

## Documentation
- Create comprehensive GitHub setup guide (GITHUB_SETUP_GUIDE.md)
- Document branch protection, merge queue, and webhook configuration
- Include troubleshooting and testing procedures

## Related
- Phase Q: Merge Queue & Automation (PR #78 - merged)
- Phase Q2: PR Action Intelligence (PR #85 - open)
- Phase 2.5: Infrastructure decisions (PR #63 - open)

This brings the automation stack online and stabilizes Railway deployments.
This commit is contained in:
Claude
2025-11-18 06:29:06 +00:00
parent 1a80c59d8b
commit deab4e79a2
8 changed files with 951 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ from app.routers import (
digitalocean, github, huggingface, vscode, games, browser, dashboard,
railway, vercel, stripe, twilio, slack, discord, sentry, api_health, agents,
capture, identity_center, notifications_center, creator, compliance_ops,
search, cloudflare, system
search, cloudflare, system, webhooks
)
from app.services.crypto import rotate_plaintext_wallet_keys
@@ -156,6 +156,16 @@ app.include_router(api_health.router)
# Agent Library
app.include_router(agents.router)
# GitHub Webhooks (Phase Q automation)
app.include_router(webhooks.router)
# Prism Console (Phase 2.5) - Admin interface at /prism
prism_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "prism-console")
if os.path.exists(prism_dir):
app.mount("/prism", StaticFiles(directory=prism_dir, html=True), name="prism")
print(f"✅ Prism Console mounted at /prism")
# Static file serving for the BlackRoad OS front-end
static_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), "static")
@@ -175,6 +185,7 @@ if os.path.exists(static_dir):
"version": settings.APP_VERSION,
"environment": settings.ENVIRONMENT,
"docs": "/api/docs",
"prism": "/prism",
"status": "operational",
"note": "Front-end not found. API is operational."
}
@@ -188,6 +199,7 @@ else:
"version": settings.APP_VERSION,
"environment": settings.ENVIRONMENT,
"docs": "/api/docs",
"prism": "/prism",
"status": "operational",
"note": "API-only mode. Front-end not deployed."
}