# Docker Build Configuration

Dockerfiles for VAPORA microservices. All images are built from the root of the repository.

## Services

| Service | Dockerfile | Port | Purpose |
|---------|-----------|------|---------|
| **Backend API** | `vapora-backend.Dockerfile` | 8001 | REST API (Axum) |
| **Agent Server** | `vapora-agents.Dockerfile` | 8002 | Agent orchestration (NATS) |
| **Frontend** | `vapora-frontend.Dockerfile` | 3000 | Leptos WASM UI |
| **MCP Gateway** | `vapora-mcp-server.Dockerfile` | 3030 | Model Context Protocol |

## Building Images

All Dockerfiles are located here and reference the root workspace. Build commands:

### Build All Images

```bash
cd /Users/Akasha/Development/vapora

# Backend
docker build -f docker/vapora-backend.Dockerfile -t vapora-backend:latest .

# Agents
docker build -f docker/vapora-agents.Dockerfile -t vapora-agents:latest .

# Frontend
docker build -f docker/vapora-frontend.Dockerfile -t vapora-frontend:latest .

# MCP Server
docker build -f docker/vapora-mcp-server.Dockerfile -t vapora-mcp-server:latest .
```

### Build Script

See `../scripts/build.nu` for automated multi-image builds.

## Image Specifications

- **Base Images**: Rust 1.75+ (distroless for production)
- **Optimization**: LTO, thin LTO, release builds
- **Size Target**: < 200MB per image (distroless)

## Development Container

See `../.devcontainer/Dockerfile` for development environment setup (VS Code).

---

**Architecture**: Multi-service containerized deployment
**Orchestration**: Kubernetes (see `../kubernetes/`)
**CI/CD**: GitHub Actions / Woodpecker (see `../.github/`, `../.woodpecker/`)
