Services

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.

How it works#

  1. Developer opens PR — Code is pushed and pull request created
  2. Environment provisioned — Unique environment automatically spins up
  3. Application deployed — PR code deployed with dependencies
  4. URL generated — Unique preview URL provided
  5. Review and test — Reviewers test actual running application
  6. Cleanup — Environment destroyed on PR merge/close

Capabilities#

FeatureDescription
Automatic provisioningTriggered on PR open
Unique URLsEach PR gets its own URL
Database seedingSample data for testing
Secret managementSecure test credentials
Auto-cleanupResources removed after merge
CI/CD integrationSeamless 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/update
2
preview:
3
- provision-namespace
4
- deploy-application
5
- seed-database
6
- configure-ingress
7
- post-url-to-pr
8
9
# On PR merge/close
10
cleanup:
11
- delete-namespace
12
- cleanup-resources

Cost optimization#

Preview environments are designed to be cost-effective:

  • Minimal resource allocation
  • Auto-shutdown after inactivity
  • Shared infrastructure components
  • Cleanup on PR close

Available in#

  • S Plan — Full preview environment support
  • M Plan — Preview environments with extended features