2024-02-02 11:46:59 +00:00
|
|
|
import { type IDockerRegistryInfo, type IServiceRessources } from '../data/docker.js';
|
|
|
|
import type { IServerConfig } from './server.js';
|
|
|
|
|
2024-01-23 22:38:10 +00:00
|
|
|
export interface IClusterIdentifier {
|
|
|
|
clusterName: string;
|
|
|
|
secretKey: string;
|
|
|
|
}
|
2024-02-02 11:46:59 +00:00
|
|
|
|
|
|
|
export interface IClusterConfig {
|
|
|
|
id: string;
|
|
|
|
data: {
|
|
|
|
name: string;
|
|
|
|
secretKey: string;
|
|
|
|
jumpCode: string;
|
|
|
|
jumpCodeUsedAt: number;
|
|
|
|
/**
|
|
|
|
* how can the cluster reach cloudly
|
|
|
|
*/
|
|
|
|
cloudlyUrl: string;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* what servers are expected to be part of the cluster
|
|
|
|
*/
|
|
|
|
servers: IServerConfig[];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* the containers running
|
|
|
|
*/
|
|
|
|
containers: IClusterConfigContainer[];
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
acmeInfo: {
|
|
|
|
serverAddress: string;
|
|
|
|
serverSecret: string;
|
|
|
|
};
|
|
|
|
registryInfo: IDockerRegistryInfo;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IClusterConfigContainer {
|
|
|
|
name: string;
|
|
|
|
image: string;
|
|
|
|
ports: {
|
|
|
|
web: number;
|
|
|
|
custom?: { [domain: string]: string };
|
|
|
|
};
|
|
|
|
resources?: IServiceRessources;
|
|
|
|
domains: string[];
|
|
|
|
secrets: { [key: string]: string };
|
|
|
|
}
|