CI/CD Pipeline
AuroraSOC uses a Makefile for local development and Docker Compose for deployment. This document covers the build, test, and deployment workflow.
Makefile Targets
The project root Makefile provides 30+ targets:
Development
# Start full development stack
make dev
# Start individual services
make api # FastAPI on :8000
make dashboard # Next.js on :3000
make rust-core # Rust engine on :8080
# Start infrastructure only
make infra # Postgres, Redis, Qdrant, NATS, MQTT, OTEL
Testing
# Run all Python tests
make test
# Run with coverage
make test-coverage
# Run specific test file
make test FILE=tests/test_auth.py
# Run Rust tests
make test-rust
Building
# Build all Docker images
make build
# Build individual images
make build-api
make build-dashboard
make build-rust
# Build for production
make build-prod
Database
# Run migrations
make migrate
# Generate new migration
make migration MSG="Add new table"
# Reset database
make db-reset
Deployment
# Deploy production stack
make deploy
# Deploy with monitoring
make deploy-full
# Stop all services
make down
# View logs
make logs
make logs-api
make logs-rust
Docker Build Architecture
Python Dockerfile (Dockerfile.python)
FROM python:3.12-slim AS builder
WORKDIR /app
COPY pyproject.toml .
RUN pip install --no-cache-dir -e ".[all]"
FROM python:3.12-slim
WORKDIR /app
COPY /usr/local/lib/python3.12 /usr/local/lib/python3.12
COPY /usr/local/bin /usr/local/bin
COPY aurorasoc/ aurorasoc/
COPY alembic/ alembic/
COPY alembic.ini .
EXPOSE 8000
CMD ["uvicorn", "aurorasoc.api.main:app", "--host", "0.0.0.0", "--port", "8000"]
Rust Dockerfile (Dockerfile.rust)
FROM rust:1.77-bookworm AS builder
WORKDIR /app
COPY rust_core/ .
RUN cargo build --release
FROM debian:bookworm-slim
COPY /app/target/release/aurora-core /usr/local/bin/
EXPOSE 8080
CMD ["aurora-core"]
Dashboard Dockerfile (Dockerfile.dashboard)
FROM node:22-alpine AS builder
WORKDIR /app
COPY dashboard/package.json dashboard/package-lock.json ./
RUN npm ci
COPY dashboard/ .
RUN npm run build
FROM node:22-alpine
WORKDIR /app
COPY /app/.next/standalone ./
COPY /app/.next/static ./.next/static
EXPOSE 3000
CMD ["node", "server.js"]
Docker Compose Networks
Four isolated networks:
- aurora-frontend — Dashboard ↔ API only
- aurora-backend — API ↔ Agents internal communication
- aurora-data — Database access (Postgres, Redis, Qdrant)
- aurora-messaging — Event buses (NATS, MQTT)
Development Workflow
Hot Reload
Development mode mounts source code as volumes for hot reload:
# docker-compose.dev.yml
api:
volumes:
- ./aurorasoc:/app/aurorasoc
command: uvicorn aurorasoc.api.main:app --reload --host 0.0.0.0
dashboard:
volumes:
- ./dashboard/src:/app/src
command: npm run dev
Environment Configuration
Required Environment Variables
# Core
AURORA_LLM__API_KEY=your-openai-or-watsonx-key
AURORA_LLM__MODEL=gpt-4o
# Database
AURORA_POSTGRES__URL=postgresql+asyncpg://aurora:aurora@postgres:5432/aurorasoc
# Redis
AURORA_REDIS__URL=redis://redis:6379
# NATS
AURORA_NATS__URL=nats://aurora:password@nats:4222
# MQTT
AURORA_MQTT__HOST=mosquitto
AURORA_MQTT__PORT=8883
# Auth
AURORA_AUTH__JWT_SECRET=your-secret-key
# Qdrant
AURORA_QDRANT__HOST=qdrant
AURORA_QDRANT__PORT=6333
Using .env File
cp .env.example .env
# Edit with your values
vim .env
Docker Compose automatically reads .env from the project root.