Examples
Step-by-step guides for common deployment scenarios. Each example is self-contained and can be copied directly to your terminal.
Quick Start
Deploy Your First Application
The simplest possible deployment: a single service that responds to HTTP requests. The VM boots on the first request and stays warm for subsequent requests.
Create a stack with a web service
Test it (first request triggers cold boot)
Check running instances
Clean up when done
Production Stack
Always-On Production Environment
Create a production stack with multiple services that run continuously. Each stack is a complete application definition.
Create the prod stack with all services
Set environment variables for prod
Access services
Development Stack
Scale-to-Zero Development Environment
Create a separate dev stack that scales to zero when idle. Services boot on first request and shut down after inactivity.
Create the dev stack
Set dev-specific environment
Access dev services
Result: Services scale to zero when idle, boot on first request.
PR Preview Environments
Variants: SHARED vs UNIQUE Services
Create PR preview variants that inherit from a stack. Only overridden services are UNIQUE (cost resources) - everything else is SHARED from the parent stack.
Create a PR variant from dev stack
What happens (SHARED vs UNIQUE)
Result: PR-42 only pays for ONE service (frontend). Database, Redis, and backend are shared from dev stack.
Access the PR preview
Clean up after PR merge
Multiple PR Variants
Different PRs, Different Overrides
Each PR can override different services. Only overridden services cost resources.
Create variants with different overrides
Cost breakdown
Database with Persistent Storage
PostgreSQL with Persistent Volume
Run a PostgreSQL database with persistent storage that survives VM restarts. Data is stored on a volume that gets reattached on cold boot.
Create a persistent volume
Create stack with database service
Verify the database is running
Create a backup snapshot
GPU-Accelerated Workload
ML Inference with GPU Passthrough
Run GPU-accelerated workloads with automatic hypervisor selection. The system picks QEMU when GPU support is needed.
Create a GPU workload
Or add GPU service to a stack
Create a VM snapshot for fast warm starts
Custom Domains
Set Up Custom Domain with Aliases
Map your own domain names to stack services. After DNS is configured, requests to your domain route directly to the right service.
Create aliases for production services
Configure your DNS
Point your domain to the Tidedge load balancer IP or CNAME.
Test the aliases
List and manage aliases
Warm Pools for Fast Cold Starts
Pre-warm VMs for Instant Scaling
Create pools of pre-warmed VMs that can be instantly converted to service instances when requests arrive. The scheduler matches compatible layer stacks.
Create a warm pool with Node.js base
Deploy services that use this base
Monitor pool status
Environment Variables
Variables at Different Levels
Environment variables cascade down and can be overridden at each level. Priority (lowest to highest): image → project → stack → variant → service
Set variables at different scopes
Resolution order
List and manage variables
Complete Working Example
Full Workflow: Prod + Dev + PR Preview
Complete example showing the recommended setup: production stack, development stack, and PR preview variant with shared services.