From 6191d1cc876a758adaa978e55dc0e2cd3bc18ef0 Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Sat, 2 May 2026 18:58:21 +0000 Subject: [PATCH] feat: add service volume contracts --- ts/data/service.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ts/data/service.ts b/ts/data/service.ts index a51b9e7..1a6df2a 100644 --- a/ts/data/service.ts +++ b/ts/data/service.ts @@ -1,6 +1,22 @@ import type { IServiceRessources } from './docker.js'; import type { IRegistryTarget } from './registry.js'; +export interface IServiceVolume { + /** Stable Docker volume name. If omitted, Coreflow derives one from service id and mount path. */ + name?: string; + /** Alias for name when a volume is shared intentionally across services. */ + source?: string; + /** Container path where the volume is mounted. */ + mountPath: string; + /** Docker volume driver. Defaults to corestore. */ + driver?: 'corestore' | 'local' | string; + readOnly?: boolean; + /** Whether backup orchestration should snapshot this volume. Defaults to true. */ + backup?: boolean; + /** Driver-specific options forwarded to Docker's VolumeDriver.Create request. */ + options?: Record; +} + export interface IService { id: string; data: { @@ -55,6 +71,7 @@ export interface IService { web: number; custom?: { [domain: string]: string }; }; + volumes?: IServiceVolume[]; resources?: IServiceRessources; domains: { /**