feat: add service volume contracts

This commit is contained in:
2026-05-02 18:58:21 +00:00
parent 7f5cb4e247
commit 6191d1cc87
+17
View File
@@ -1,6 +1,22 @@
import type { IServiceRessources } from './docker.js'; import type { IServiceRessources } from './docker.js';
import type { IRegistryTarget } from './registry.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<string, string>;
}
export interface IService { export interface IService {
id: string; id: string;
data: { data: {
@@ -55,6 +71,7 @@ export interface IService {
web: number; web: number;
custom?: { [domain: string]: string }; custom?: { [domain: string]: string };
}; };
volumes?: IServiceVolume[];
resources?: IServiceRessources; resources?: IServiceRessources;
domains: { domains: {
/** /**