Skip to content

Stages

1. Stage Overview

Stages are isolated execution environments for a subscription. Each subscription can have multiple stages (e.g., development, testing, production) up to its stage limit.

Basic Information

  1. Name - Stage identifier (readonly, unique per subscription)
  2. UUID - Auto-generated unique identifier
  3. Subscription - Parent subscription reference (required)
  4. Domain - FQDN for accessing the stage (unique, required)
  5. State - Current lifecycle: Build, Running, Stopped, Terminated, Cancelled
  6. End Date - When the stage expires
  7. HTTP Port - Application port on host server (readonly)

Storage Tracking

  1. Database Size - Database size in MB
  2. Filestore Size - Filestore size in MB
  3. User Addons Size - Custom addons directory size in MB
  4. Storage Used - Total computed usage (database + filestore + addons)
  5. Active User Count - Current active users on the stage

Infrastructure

  1. Nginx Host - Linked Nginx reverse proxy configuration
  2. Nginx Server - Nginx Proxy Manager instance
  3. Nginx IP - Server IP for Nginx
  4. Cloudflare Record - DNS A record for this stage
  5. Cloudflare Proxied - Whether DNS is proxied through Cloudflare
  6. Cloudflare Connector - Cloudflare API connection
  7. Destination Addons Dir - Remote directory path for custom addons (computed)

Git Integration

  1. Git Branch Name - Branch deployed to this stage
  2. Git Repository Name - Linked repository path
  3. Last Commit - Most recent deployed commit
  4. Last Commit Message - Commit description
  5. Git Commit Count - Total commits deployed to this branch
  6. Webhook State - not_linked or linked
  7. Clear Destination Directory - Remove old files before deploying new commit

Code Server (VS Code)

  1. Code Server Domain - Access URL for the browser-based editor
  2. Code Server Password - Authentication password
  3. Code Server Port - Internal port (readonly)
  4. Code Server State - Draft, Running, or Stopped

SQL Console

  1. SQL Input - Query text box
  2. SQL Output - Query results

Caution

SQL queries execute directly on the stage database. Use with care.


2. Stage Lifecycle

Build → Running → Stopped → Terminated
                     ↓
                  Cancelled
State Description
Build Stage infrastructure is being provisioned
Running Stage is live and accepting traffic
Stopped Stage is paused, can be resumed
Terminated Permanently disabled
Cancelled All resources deleted and cleaned up

3. Stage Actions

Action Description
Create Stage Provisions DNS, Nginx proxy, and database for the stage
Start Resume a stopped stage
Stop Pause the stage without deleting data
Cancel Full teardown - removes DNS record, Nginx host, and database
Create Code Server Set up browser-based VS Code for the stage
Start Code Server Resume a stopped code server
Stop Code Server Pause the code server
Remove Code Server Delete the code server and its resources
Change Code Server Password Generate new authentication password

4. Stage Creation Process

When a new stage is created, it goes through these steps:

  1. Pre-validation - Check stage limit not exceeded
  2. DNS Step - Create Cloudflare DNS record pointing to server IP
  3. Nginx Step - Create reverse proxy configuration with SSL
  4. Database Step - Create database (or restore from template if configured)
  5. Configuration - Apply subscription settings to the new stage

Stage Limits

Each subscription has a stage_limit field that controls the maximum number of stages allowed. This limit is set by the product configuration or can be updated via update requests.