manage-apps/shared/types.ts
autocommit fa0d2a657f feat(cli): Add environment variable support to CLI startup command
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-04-20 00:05:39 -07:00

56 lines
2.1 KiB
TypeScript

export interface HostMeta { label: string; ip: string; local: boolean; ssh?: string }
export interface DeployConfig { script: string }
export interface ServiceConfig {
type: string;
port?: string;
domain?: string;
internal: boolean;
name?: string;
systemdUnit?: string;
description?: string;
isSupporting: boolean;
enabled?: boolean;
/** Per-service start command. Overrides platform.start when present. */
start?: InstallConfig;
/** Per-service stop command. When absent, stop falls back to killing by port or docker compose down. */
stop?: InstallConfig;
/** Docker compose file (relative to repo root) for type=docker-compose services. */
compose?: string;
/** `docker compose` service name (defaults to compose project default) for up/down targeting. */
composeService?: string;
}
export interface InstallConfig { path: string; script: string }
export interface StatusConfig { command: string; type: string }
export interface SetupStep { name: string; script: string }
export interface HostSetup { os: string; steps: SetupStep[] }
export interface PlatformConfig {
os: string;
host: string;
environment: string;
services: Record<string, ServiceConfig>;
supportingServices: Record<string, ServiceConfig>;
install?: InstallConfig;
setup?: InstallConfig;
start?: InstallConfig;
stop?: InstallConfig;
status?: StatusConfig;
logs: Record<string, unknown>;
deploy?: Record<string, DeployConfig>;
/** Path to a .env file (relative to manifest repo root) sourced before every service start script. */
envFile?: string;
}
export interface AppManifest {
name: string;
description: string;
type: string;
version: string;
platforms: Record<string, PlatformConfig>;
path: string;
/** Repo root relative to the manifest directory. Defaults to '.'. */
repoRoot: string;
category: string;
hostSetup: Record<string, HostSetup>;
/** Other app names that must be started before this app. */
deps: string[];
}
export interface Registry { name: string; type: string; host: string; port: number; domain: string; environment: string; url: string }