Preview Apps
Overview
Preview apps in Tapitalee are temporary copies of your application designed for testing features, pull requests, or experimental changes. They provide isolated environments that mirror your production setup while allowing safe testing without affecting your main application.
Resources copied from parent app on creation:
- Process configuration (eg. cpu/memory)
- Variable & secret values
- Commands
- Predeploy steps
- Add-ons optionally can be shared or you can create new ones per-preview-app
Subdomains for Preview Apps
It is a best practice to give each preview app its own subdomain. This can be achieved by creating a SecureProxy and Route53 Zone in the parent app, which will be automatically shared with the child preview apps.
Setup
- Register a domain for your preview apps (e.g.,
mypreviewsdomain.com) - Create a Route53 hosted zone for the domain in your parent app
- Add a wildcard domain to the parent app (e.g.,
*.mypreviewsdomain.com) so SecureProxy can handle traffic for it - Create SecureProxy in the parent app with Route53 integration (set DNS Challenge Provider to Route53)
- Add individual domains to each preview app (e.g.,
pr-1234.mypreviewsdomain.com)
SecureProxy will route traffic to the appropriate preview app and use the wildcard certificate to serve it over TLS.
Example
# In parent app: Create Route53 hosted zone
tapit create addon route53 domain=mypreviewsdomain.com
# In parent app: Create SecureProxy with Route53 DNS challenge
tapit create secureproxy acme_email=my@email.com dns_challenge_provider=route53
# Add wildcard domain to parent app
tapit create domain '*.mypreviewsdomain.com'
# Create preview app with its own subdomain
tapit create preview pr-1234-myapp domain=pr-1234.mypreviewsdomain.comUse Cases
Development Workflow
- Pull Request Testing: Create preview apps for each PR to test changes
- Feature Development: Isolated environments for developing new features
- Stakeholder Review: Share working versions with non-technical stakeholders
Commands
Create Preview App
tapit create preview <new_app_name> [domain=www.myapp.com] [delete_in_days=7] [-w|--wait]Creates a temporary copy of your application for testing features or pull requests.
This happens under the umbrella of an existing app so it can share process and environment variable configuration, and add-ons (if shared).
Parameters
new_app_name: Name for the preview applicationdomain: Optional custom domain for the preview appdelete_in_days: Automatic deletion after specified days (default: 7)--wait: Wait for preview app creation to complete
Examples
# Create PR preview app
tapit create preview pr-123-myapp delete_in_days=14
# Feature branch testing
tapit create preview feature-auth-myapp domain=auth-test.myapp.com delete_in_days=30
# Quick testing environment
tapit create preview test-myapp delete_in_days=1 --waitList Preview Apps
tapit list previewsShows all preview applications and their status.
Delete Preview App
tapit delete preview <preview_app_name>Manually deletes a preview application before its expiration.
Add-on Configuration
# Create separate database for preview app
tapit -a pr-123-myapp create addon rds name=preview-db
# Share add-ons from main app (cost-effective for testing)
tapit -a pr-123-myapp create shared-addon main-cache