diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 563cfe7..4dfc83e 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/interfaces', - version: '1.0.35', + version: '1.0.36', description: 'interfaces for working with containers' } diff --git a/ts/data/cluster.ts b/ts/data/cluster.ts index 96bc92b..e030d94 100644 --- a/ts/data/cluster.ts +++ b/ts/data/cluster.ts @@ -1,6 +1,6 @@ import * as plugins from '../plugins.js'; -import { type IDockerRegistryInfo, type IServiceRessources } from '../data/docker.js'; +import { type IDockerRegistryInfo } from '../data/docker.js'; import type { IServer } from './server.js'; export interface IClusterIdentifier { @@ -42,15 +42,3 @@ export interface ICluster { sshKeys: plugins.tsclass.network.ISshKey[]; }; } - -export interface IService { - name: string; - image: string; - ports: { - web: number; - custom?: { [domain: string]: string }; - }; - resources?: IServiceRessources; - domains: string[]; - secrets: { [key: string]: string }; -} diff --git a/ts/data/index.ts b/ts/data/index.ts index 276586f..835c868 100644 --- a/ts/data/index.ts +++ b/ts/data/index.ts @@ -7,6 +7,7 @@ export * from './env.js'; export * from './event.js'; export * from './secret.js' export * from './server.js'; +export * from './service.js'; export * from './status.js'; export * from './traffic.js'; export * from './version.js'; diff --git a/ts/data/server.ts b/ts/data/server.ts index 14305cd..37ef93a 100644 --- a/ts/data/server.ts +++ b/ts/data/server.ts @@ -17,15 +17,18 @@ export interface IServerMetrics { } export interface IServer { - type: 'server'; + id: string; + data: { + type: 'baremetal' | 'hetzner'; - /** - * a list of debian packages to be installed - */ - requiredDebianPackages: string[]; + /** + * a list of debian packages to be installed + */ + requiredDebianPackages: string[]; - /** - * a list of SSH keys to deploy - */ - sshKeys: plugins.tsclass.network.ISshKey[]; + /** + * a list of SSH keys to deploy + */ + sshKeys: plugins.tsclass.network.ISshKey[]; + }; } diff --git a/ts/data/service.ts b/ts/data/service.ts new file mode 100644 index 0000000..54a042c --- /dev/null +++ b/ts/data/service.ts @@ -0,0 +1,13 @@ +import type { IServiceRessources } from "./docker.js"; + +export interface IService { + name: string; + image: string; + ports: { + web: number; + custom?: { [domain: string]: string }; + }; + resources?: IServiceRessources; + domains: string[]; + secrets: { [key: string]: string }; +} \ No newline at end of file