Deployment & Docker Setup
Relevant source files
The following files were used as context for generating this wiki page:
Deployment and Docker Setup defines the infrastructure, containerization, and automated orchestration strategies for the NeXifyAI platform. The system uses a combination of Docker for local and specialized service environments, Vercel for frontend hosting, and automated CI/CD pipelines to ensure enterprise-grade stability and security.
The platform follows a monorepo structure where the frontend resides in apps/web/ and the backend services are located in services/api/. Deployment strategies include Blue/Green and Canary patterns, managed through automated scripts and GitHub Actions.
Sources: RELEASE_NOTES-v4.0.0.md:30-32, WORKSPACE.md:5-15, nexifyai-github-prompt.prompt.yml:435-439
Infrastructure Architecture
The NeXifyAI architecture consists of a React 18 frontend communicating with a FastAPI backend. Data persistence utilizes MongoDB for CRM and lead data, while Supabase (PostgreSQL) handles Oracle tasks, Brain notes, and audit logs. Specialized services like Qdrant and Redis are hosted via Docker.
Core Component Interaction
The following diagram illustrates the relationship between frontend, backend, and external infrastructure services.
Sources: SETUP.md:76-85, WORKSPACE.md:27-35
Docker Configuration
The platform uses Docker to containerize the Python-based backend and supporting services like Qdrant (Local Brain DB) and Redis. Production-grade deployments are often managed via Coolify or dedicated Virtual Dedicated Servers (VDS).
Backend Dockerfile Example
The backend is containerized using a Python 3.11 slim image to ensure a lightweight footprint.
FROM python:3.11-slim
WORKDIR /app
COPY backend/ .
RUN pip install -r requirements.txt
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8001"]
Sources: SETUP.md:65-71
Service Dependency Management
The WORKSPACE.md defines the local infrastructure requirements handled by Docker:
- Qdrant: Local vector database at
http://localhost:6333using thenexifyai_braincollection. - Redis: Used for caching and messaging, listening on port
6379.
Sources: WORKSPACE.md:27-35
Automated Deployment Management
NeXifyAI utilizes specialized Python scripts to manage the deployment lifecycle and infrastructure as code. These tools automate pipeline generation, terraform scaffolding, and production-grade deployment orchestration.
Deployment Tools
| Script | Function | Usage |
|---|---|---|
pipeline_generator.py | Generates automated CI/CD pipelines with quality checks. | python scripts/pipeline_generator.py [options] |
terraform_scaffolder.py | Optimizes and scaffolds infrastructure as code (IaC). | python scripts/terraform_scaffolder.py . |
deployment_manager.py | Orchestrates expert-level deployment automation and analysis. | python scripts/deployment_manager.py --analyze |
Sources: nexifyai-github-prompt.prompt.yml:7-45
Deployment State Machine
The Order Workflow Specialist manages the transition of code and tasks through the production pipeline, ensuring no work completes without verification.
Quality Gates & Verification
The Senior Quality Auditor enforces mandatory quality gates before any deployment reaches production. These gates prevent deployment if documentation, tests, or security scans are missing.
The Seven Quality Gates
- Documentation Gate: Architecture specs, API docs, and SOP references must exist.
- Test Gate: Unit tests must have ≥80% coverage for P0 tasks; integration and security scans must pass.
- Security Gate: Secrets must be in a vault, and Zero Trust/RBAC must be enforced.
- Architecture Gate: Must fit the 12-System model and scaling plans.
- Performance Gate: API latency must be <200ms p95; agent response <5s.
- Workflow Gate: Tasks must be tracked in the order-workflow system.
- Agent Gate: Agent profiles must be ≥4000 characters and include Brain-First integration.
Sources: services/api/agents/brain_agents/senior-quality-auditor.md:24-65
CI/CD Pipeline Flow
The deployment sequence follows a multi-stage approach using GitHub Actions and Vercel.
Summary
The NeXifyAI Deployment & Docker Setup provides a robust, automated framework for enterprise AI operations. By utilizing Docker for backend services, Vercel for frontend distribution, and strict AI-driven quality gates, the platform ensures that all production code is secured, documented, and performance-tested. The integration of automated deployment managers and state-machine workflows allows for high-velocity releases without compromising system integrity.