A lightweight GitOps deployment engine that watches Git repos, builds Docker images, and deploys to multiple target types (ECS, Cloud Run, K8s, VMs) via a unified provider interface.
- Multi-Cloud Deployments — Cloud Run, ECS Fargate, Kubernetes, VMs
- Policy-as-Code — OPA Rego policies with bundle signing
- Preview Environments — PR-triggered, auto-destroy on close
- Real-Time Dashboard — SSE event streaming, dark mode UI
- Instant Rollback — One-click or automatic with 3/hr guardrails
- Edge Agents — Zero-trust policy enforcement at the edge
┌─────────────────────────────────────────────────────────┐
│ DeployMate Engine (Go) │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌──────────┐ │
│ │ Chi API │ │ Redis │ │ Postgres │ │ OPA │ │
│ └────┬────┘ └────┬────┘ └────┬────┘ └────┬─────┘ │
│ └────────────┼────────────┼─────────────┘ │
└────────────────────┼────────────┼─────────────────────┘
│ │
┌────────────────┼────────────┼────────────────┐
│ │ │ │
▼ ▼ ▼ ▼
┌────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ K8s │ │ Cloud │ │ ECS │ │ VM │
│ Agent │ │ Run │ │ Fargate │ │ SSH │
└────────┘ └──────────┘ └──────────┘ └──────────┘
# Start everything (PostgreSQL + Redis + Engine API)
docker-compose up --buildEngine runs at http://localhost:8080. Test it:
# Health check
curl http://localhost:8080/healthz
# Get desired state (requires OIDC token in production)
curl http://localhost:8080/api/v1/deployments/test-1/desired-statecd apps/dashboard
npm install
npm run devDashboard runs at http://localhost:3000.
# Build agent
go build -o agent ./cmd/agent
# Run locally (needs kubeconfig)
ENGINE_URL=http://localhost:8080 ./agent- Go 1.23+
- PostgreSQL 15+
- Redis 7+
- Node.js 18+ (for dashboard)
deploymate/
├── cmd/
│ ├── engine/ # Main API server
│ └── agent/ # K8s edge agent
├── internal/
│ ├── agent/ # Agent reconciler
│ ├── auth/ # OIDC authentication
│ ├── cache/ # Redis cache layer
│ ├── config/ # Configuration
│ ├── handler/ # HTTP handlers
│ ├── model/ # Domain models
│ ├── policy/ # OPA policy engine
│ ├── preview/ # Preview environments
│ ├── provider/ # Deployer implementations
│ └── store/ # PostgreSQL store
├── apps/dashboard/ # Next.js dashboard
├── migrations/ # Database migrations
├── docs/ # Documentation
├── Dockerfile.engine # Engine container
└── Dockerfile.agent # Agent container
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /healthz |
No | Health check |
| GET | /api/v1/deployments/{id}/desired-state |
OIDC | Get desired state |
| POST | /api/v1/deployments/{id}/rollback |
OIDC | Trigger rollback |
| GET | /api/v1/events |
No | SSE event stream |
| POST | /api/v1/webhooks/github |
HMAC | GitHub webhook |
Environment variables:
# Server
SERVER_HOST=0.0.0.0
SERVER_PORT=8080
# Database
DB_HOST=localhost
DB_PORT=5432
DB_USER=deploymate
DB_PASSWORD=deploymate
DB_NAME=deploymate
# Redis
REDIS_HOST=localhost
REDIS_PORT=6379
# OIDC
OIDC_ISSUER=https://token.actions.githubusercontent.com
OIDC_AUDIENCE=deploymate# Run all tests
go test ./internal/... -v
# Run with coverage
go test ./internal/... -cover
# Run specific package
go test ./internal/policy/... -v# Build engine
docker build -f Dockerfile.engine -t deploymate/engine .
# Build agent
docker build -f Dockerfile.agent -t deploymate/agent .apiVersion: apps/v1
kind: Deployment
metadata:
name: deploymate-engine
spec:
replicas: 2
selector:
matchLabels:
app: deploymate-engine
template:
metadata:
labels:
app: deploymate-engine
spec:
containers:
- name: engine
image: deploymate/engine:latest
ports:
- containerPort: 8080See docs/PRD.md for full architecture decisions (18 total).
Key decisions:
- Hybrid Push/Pull — Engine pushes, agents pull for resilience
- Dual OPA Eval — Central + edge policy enforcement
- Sigstore Signing — Keyless bundle verification
- SSE over WebSockets — Simpler, asymmetrical data flow
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
MIT