Automated preview deployment system for backend applications (NestJS, Go, Laravel, Rust, Python) that creates isolated preview environments on Digital Ocean when GitHub PRs are opened, similar to how Vercel/Netlify work for frontend apps.
- 🚀 Automatic Preview Environments: Creates isolated Docker containers for each PR
- 🗄️ Database Isolation: Each preview gets its own database instance (PostgreSQL, MySQL, or MongoDB)
- 🔄 Auto Updates: Preview environments rebuild automatically on PR updates
- 🧹 Auto Cleanup: Removes preview environments when PRs are closed or after TTL expires
- 🌐 Nginx Routing: Path-based routing (
/{projectSlug}/pr-{number}/) to preview environments (project slug from repo owner/name avoids collisions across repos) - 📦 Infrastructure as Code: Terraform for provisioning, Ansible for configuration
- 🛠️ CLI Tool: Simple command-line interface for setup and management
- 🔒 Secure: Webhook signature verification, repository whitelisting, input sanitization
- Frameworks: NestJS, Go, Laravel, Rust, Python (templates and/or auto-detection)
- Extra services: e.g. Redis via repo
preview-config.yml(extra_services) - Repo-owned Compose: Optional
docker-compose.preview.ymlin repo root; build_commands, startup_commands, env injection, custom Dockerfile path - API: OpenAPI/Swagger for the orchestrator
GitHub Webhook → Orchestrator API → Docker Containers → Nginx Reverse Proxy → Preview URLs
Key Components:
- Terraform: Provisions Digital Ocean droplet with networking and security
- Ansible: Configures server with Docker, nginx, and orchestrator service
- Orchestrator: TypeScript service handling webhooks, Docker management, nginx config, and cleanup
- CLI: User-facing tool for setup, management, and teardown
See the Quickstart guide for detailed setup instructions.
# Install dependencies
pnpm install
# Build (required before using the CLI)
pnpm build
# Option A: Use the CLI from the repo (no global install)
pnpm preview init
pnpm preview setup
# Option B: Link the CLI globally so you can run `preview` from anywhere
pnpm link --global -C cli
preview init
preview setup
# Create a PR in your repository to trigger a preview deploymentThe product is Prvue. Install and config paths intentionally stay preview-deployer (e.g. /opt/preview-deployer, ~/.preview-deployer) so operators have a consistent, easy-to-type name for logs and debugging. The systemd service is named preview-orchestrator.
prvue/
├── terraform/ # Infrastructure as Code
├── ansible/ # Server configuration
├── orchestrator/ # Core deployment service
├── cli/ # Command-line interface
├── templates/ # User-facing templates
├── docs/ # Documentation
└── scripts/ # Utility scripts
- NestJS, Go, Laravel, Rust, Python
- PostgreSQL, MySQL, MongoDB
pnpm --filter @prvue/orchestrator run test:unit # unit only
pnpm --filter @prvue/orchestrator run test:all # unit + integration
pnpm --filter @prvue/orchestrator run test:e2e # E2E API tier (optional full tier with E2E_FULL=1)See Testing for integration, E2E, coverage, and env vars.
Documentation is published at docs.prvue.dev (Mintlify). For local development, run mintlify dev in the docs repo.
- Quickstart – Get started in minutes
- Architecture – System design and components
- Configuration – Configuration reference
- Examples – NestJS, Laravel, Go, Python, and Rust example repos
- Testing – Running tests and coverage
- Troubleshooting – Common issues and solutions
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
MIT