/**
 * Resolve a Forge-style fleet topology from a compute config, and wire app
 * servers at a dedicated services box.
 *
 * Roles:
 *  - `app`      — runs nginx + php-fpm, the app is deployed to every app server.
 *  - `services` — a dedicated box running the database/cache/search.
 *  - `lb`       — the load balancer fronting the app servers.
 *
 * Single-server (the common case) resolves to one `app` box with services
 * co-located. A multi-app fleet (`appServers > 1`) gets a load balancer, a
 * private network, and (required) a dedicated services box so every app server
 * shares one database/cache.
 */
import type { CloudConfig, ComputeConfig, DatabaseConfig } from '@ts-cloud/core';
export type FleetRole = 'app' | 'services' | 'lb';
export interface FleetTopology {
    /** Number of application servers. */
    appServers: number;
    /** Provision a load balancer in front of the app servers. */
    loadBalancer: boolean;
    /** Provision a dedicated services box (DB/cache/search off the app servers). */
    dedicatedServices: boolean;
    /** Whether the app servers should install services locally (single-box only). */
    servicesOnApp: boolean;
}
/** Resolve the fleet topology from the compute config. */
export declare function resolveFleetTopology(compute?: ComputeConfig): FleetTopology;
/**
 * Build the `.env` overrides that point a PHP app at a dedicated services box
 * over the private network (DB + Redis + Meilisearch all live there). Merge
 * under `site.env` (explicit values win).
 */
export declare function buildFleetServicesEnv(servicesPrivateIp: string, database?: DatabaseConfig): Record<string, string>;
/**
 * Build the provision commands for a fleet's dedicated services box (DB /
 * cache / search only — no app runtime, no gateway). Shared by the PHP fleet
 * and the bun/node/deno fleet so the two paths can never drift: engine
 * installs bound to the private network, the app database + user, box
 * maintenance, the on-box notifier (so the monitoring cron can report — a
 * no-op unless notifications are configured), and — when `compute.backups`
 * is enabled — the nightly DB backup, which MUST run here (where the
 * database lives), never on an app box.
 */
export declare function buildFleetServicesBoxProvision(config: CloudConfig): string[];
