Deployment
Docker Compose Deployment
Full edge stack with Postgres, Redis, gateway, and dashboard.
Docker Compose Deployment
Overview
Run the full AgentTrust stack locally or on a single node: PostgreSQL, Redis, FastAPI gateway, and React dashboard via docker compose up.
Why It Matters
Docker Compose is the recommended staging environment and the fastest path to the full governance engine suite.
Prerequisites
- Docker and Docker Compose
agentrust-edge/directory
Step-by-Step Guide
1. Navigate and configure
cd agentrust-edge/
cp .env.example .env # if exists, or set vars belowRequired environment variables:
POSTGRES_PASSWORD=your_secure_password
REDIS_PASSWORD=your_redis_password
AGENTRUST_JWT_SECRET=your_jwt_secret_min_32_charsOptional:
AGENTRUST_API_KEYS=at_team_key1,at_team_key22. Start stack
docker compose up -d3. Verify services
| Service | URL |
|---|---|
| Gateway | http://localhost:8000 |
| Dashboard | http://localhost:3000 |
| OpenAPI | http://localhost:8000/docs |
| Health | http://localhost:8000/health |
4. Point SDK at gateway
export AGENTRUST_GATEWAY_URL=http://localhost:8000
export AGENTRUST_KEY=at_team_your_key5. Stop
docker compose downExamples
Smoke test:
curl http://localhost:8000/healthBest Practices
- Never use default passwords in production
- Mount policy packs as read-only volumes
- Set
AUTH_ENABLED=true(default in production compose) - Back up PostgreSQL volume regularly
- Set
VITE_API_URLfor dashboard to gateway URL
Common Mistakes
- Forgetting
AGENTRUST_JWT_SECRET(auth fails) - Exposing port 5432 publicly
- Running without Redis (judge queue and rate limiting break)
Troubleshooting
| Issue | Fix |
|---|---|
| Gateway won't start | Check docker compose logs gateway |
| Dashboard blank | Verify VITE_API_URL points to gateway |
| DB migration errors | Set AGENTRUST_AUTO_MIGRATE=true for dev |