Dynamic Preview Environments
On-demand environments for every pull request
Dynamic preview environments automatically create isolated deployment environments for every pull request, enabling faster code review and earlier issue detection.
Preview environments are included in S and M plans only.
How it works#
- Developer opens PR — Code is pushed and pull request created
- Environment provisioned — Unique environment automatically spins up
- Application deployed — PR code deployed with dependencies
- URL generated — Unique preview URL provided
- Review and test — Reviewers test actual running application
- Cleanup — Environment destroyed on PR merge/close
Capabilities#
| Feature | Description |
|---|---|
| Automatic provisioning | Triggered on PR open |
| Unique URLs | Each PR gets its own URL |
| Database seeding | Sample data for testing |
| Secret management | Secure test credentials |
| Auto-cleanup | Resources removed after merge |
| CI/CD integration | Seamless pipeline integration |
Benefits#
Faster code review#
- Reviewers see actual running application
- No need to checkout and run locally
- Immediate feedback on UI/UX changes
- QA can test before merge
Earlier issue detection#
- Catch integration issues pre-merge
- Test database migrations safely
- Verify feature completeness
- Validate API changes
Improved collaboration#
- Share preview links with stakeholders
- Product team can review features
- Designers can verify implementation
- External testers can participate
Technical implementation#
Infrastructure#
- Kubernetes namespace per preview
- Shared cluster resources
- Resource limits to control costs
- Automatic resource scaling
Database options#
- Fresh database per preview
- Seeded with sample data
- Branch from production snapshot
- Shared staging database
Networking#
- Unique subdomain per PR
- TLS certificates
- Authentication (optional)
- Network isolation
Example workflow#
1# On PR open/update2preview:3 - provision-namespace4 - deploy-application5 - seed-database6 - configure-ingress7 - post-url-to-pr89# On PR merge/close10cleanup:11 - delete-namespace12 - cleanup-resourcesCost optimization#
Preview environments are designed to be cost-effective:
- Minimal resource allocation
- Auto-shutdown after inactivity
- Shared infrastructure components
- Cleanup on PR close