feat: add custom domain support with SSL, DNS verification, and billing

Users can assign a custom domain to their app with automatic SSL via
cert-manager. Includes DNS verification flow (CNAME check), Persian
instructions, admin-configurable pricing via PlatformSetting, and
integration into the deploy wizard cost calculation.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
keyhan
2026-05-14 00:36:29 +03:30
parent d87b50c6a4
commit 435cf92817
18 changed files with 1082 additions and 89 deletions
+11 -1
View File
@@ -39,11 +39,17 @@ export interface Application {
poolId?: string;
latestImageTag?: string;
subdomain?: string;
customDomain?: string;
customDomainStatus?: 'none' | 'pending_dns' | 'verified';
customDomainVerifiedAt?: string;
deployments?: Deployment[];
// Optional services
enableRedis?: boolean;
redisVersion?: string;
enableRabbitmq?: boolean;
rabbitmqVersion?: string;
enableElasticsearch?: boolean;
elasticsearchVersion?: string;
logPaths?: string[];
// Billing & Lifecycle
planId?: string;
@@ -127,10 +133,14 @@ export interface CreateApplicationDto {
port?: number;
clusterId?: string;
poolId?: string;
customDomain?: string;
// Optional services
enableRedis?: boolean;
redisVersion?: string;
enableRabbitmq?: boolean;
rabbitmqVersion?: string;
enableElasticsearch?: boolean;
elasticsearchVersion?: string;
logPaths?: string[];
}
@@ -263,7 +273,7 @@ export interface TicketStats {
// ─── Billing types ──────────────────────────────────
export type BillingCycle = 'hourly' | 'monthly' | 'yearly';
export type PricingResourceType = 'base_fee' | 'cpu_per_core' | 'memory_per_gb' | 'storage_per_gb' | 'database_addon';
export type PricingResourceType = 'base_fee' | 'cpu_per_core' | 'memory_per_gb' | 'storage_per_gb' | 'database_addon' | 'redis_addon' | 'rabbitmq_addon' | 'elasticsearch_addon' | 'custom_domain_addon';
export type TransactionType = 'charge' | 'deduction' | 'refund';
export interface PricingRule {