Deployments
Deployments represent specific builds and releases of your Git Deploy projects. Each deployment is tied to a specific Git commit and runs in an isolated confidential container.
What is a Deployment?
A deployment is created when:
- You push code to your connected Git repository
- You manually trigger a deployment via CLI or API
- A webhook triggers from your Git provider
Each deployment goes through a build process and becomes an immutable, encrypted container instance.
Deployment Lifecycle
Build Phase
- QUEUED - Deployment is waiting in the build queue
- BUILDING - Source code is being built into a Docker image
- Build commands execute (e.g.,
npm install,npm run build) - Docker image is created and encrypted
Deploy Phase
- DEPLOYING - Image is being deployed to confidential infrastructure
- Container starts with AMD SEV-SNP encryption
- Health checks verify the deployment
- ACTIVE - Deployment is live and serving traffic
Status States
QUEUED- Waiting for available build capacityBUILDING- Build in progressDEPLOYING- Deploying to productionACTIVE- Live and serving requestsFAILED- Build or deployment failedCANCELED- Manually canceled by user
Creating Deployments
Manual Trigger
# Deploy latest commit from main branch
teenode deployment create proj_abc123 \
--commit-sha abc123def \
--branch mainGit Push (Automatic)
Configure automatic deployments when you push to specific branches:
# Enable auto-deploy for main branch
teenode project update my-app \
--auto-deploy-branch mainNow every push to main automatically triggers a new deployment.
Webhooks
Set up Git provider webhooks for advanced deployment triggers:
# Get webhook URL for your project
teenode project webhook my-app
# Add this URL to your GitHub/GitLab repository settingsDeployment URLs
Each deployment gets a unique URL:
# Production URL (always points to latest active deployment)
https://my-app.teenode.app
# Deployment-specific URL (immutable)
https://my-app-dep-xyz789.teenode.appDeployment Configuration
Build Configuration
Configure how your project builds via teenode.json:
{
"build": {
"command": "npm run build",
"output_dir": "dist"
},
"start": {
"command": "npm start"
},
"env": {
"NODE_ENV": "production"
}
}Environment Variables
Set environment variables for your deployments:
teenode env set my-app \
DATABASE_URL="postgres://..." \
API_KEY="secret123"Environment variables are encrypted and only accessible inside your confidential container.
Monitoring Deployments
List Deployments
teenode deployment list proj_abc123
# Limit results
teenode deployment list proj_abc123 --limit 10Get Deployment Info
teenode deployment info dep_xyz789View Logs
# Build logs
teenode deployment logs dep_xyz789 --type build
# Runtime logs
teenode deployment logs dep_xyz789 --type runtime
# Follow logs in real-time
teenode deployment logs dep_xyz789 --followRollback and Promotion
Rollback
Rollback to a previous deployment:
# Rollback to specific deployment
teenode deployment rollback dep_old123
# This creates a new deployment with the old configurationPromote
Promote a deployment-specific URL to production:
# Make deployment the active production deployment
teenode deployment promote dep_xyz789Deployment Strategies
Blue-Green Deployment
# Deploy to staging
teenode deployment create my-app --env staging
# Test on staging URL
curl https://my-app-staging.teenode.app
# Promote to production
teenode deployment promote dep_xyz789Canary Deployment
# Deploy canary with 10% traffic
teenode deployment create my-app --canary 10
# Monitor metrics
teenode deployment metrics dep_xyz789
# Promote if healthy
teenode deployment promote dep_xyz789Build Caching
Teenode automatically caches build dependencies to speed up deployments:
- Node.js
node_modules - Python
venvand packages - Ruby gems
- Go modules
Clear cache if needed:
teenode deployment create my-app --no-cacheDeployment Limits
- Build time: Maximum 30 minutes
- Build size: Maximum 10GB
- Concurrent builds: 3 per team (Free), 10 per team (Pro)
- Deployment retention: 30 days (Free), 90 days (Pro), unlimited (Enterprise)
Best Practices
- Use semantic versioning in commit messages
- Test deployments using deployment-specific URLs before promoting
- Set up automated health checks
- Monitor deployment metrics and logs
- Keep deployment configurations in version control
- Use environment variables for configuration
- Implement gradual rollouts for critical applications
Troubleshooting
Build Failures
Common causes:
- Missing dependencies in
package.json - Build commands failing
- Out of memory during build
- Timeout (over 30 minutes)
Check build logs:
teenode deployment logs dep_xyz789 --type buildRuntime Failures
Check runtime logs and health check status:
teenode deployment logs dep_xyz789 --type runtime
teenode deployment info dep_xyz789