feat(appstore): add service volumes and published ports

This commit is contained in:
2026-05-24 07:28:18 +00:00
parent e6ebac76b4
commit 5228eeaa23
26 changed files with 1790 additions and 348 deletions
+27
View File
@@ -12,6 +12,8 @@ export interface IService {
image: string;
registry?: string;
envVars: Record<string, string>;
volumes?: IServiceVolume[];
publishedPorts?: IServicePublishedPort[];
port: number;
domain?: string;
containerID?: string;
@@ -33,12 +35,35 @@ export interface IService {
appTemplateVersion?: string;
}
export interface IServiceVolume {
name?: string;
source?: string;
mountPath: string;
driver?: string;
readOnly?: boolean;
backup?: boolean;
options?: Record<string, string>;
}
export type TServicePortProtocol = 'tcp' | 'udp';
export interface IServicePublishedPort {
targetPort: number;
targetPortEnd?: number;
publishedPort?: number;
publishedPortEnd?: number;
protocol?: TServicePortProtocol;
hostIp?: string;
}
export interface IServiceCreate {
name: string;
image: string;
port: number;
domain?: string;
envVars?: Record<string, string>;
volumes?: IServiceVolume[];
publishedPorts?: IServicePublishedPort[];
useOneboxRegistry?: boolean;
registryImageTag?: string;
autoUpdateOnPush?: boolean;
@@ -57,6 +82,8 @@ export interface IServiceUpdate {
port?: number;
domain?: string;
envVars?: Record<string, string>;
volumes?: IServiceVolume[];
publishedPorts?: IServicePublishedPort[];
}
export interface IContainerStats {
+27 -1
View File
@@ -16,7 +16,8 @@ export interface IAppVersionConfig {
image: string;
port: number;
envVars?: Array<{ key: string; value: string; description: string; required?: boolean }>;
volumes?: string[];
volumes?: Array<string | data.IServiceVolume>;
publishedPorts?: data.IServicePublishedPort[];
platformRequirements?: {
mongodb?: boolean;
s3?: boolean;
@@ -27,6 +28,17 @@ export interface IAppVersionConfig {
minOneboxVersion?: string;
}
export interface IAppInstallOptions {
appId: string;
version?: string;
serviceName: string;
domain?: string;
port?: number;
publishedPorts?: data.IServicePublishedPort[];
envVars?: Record<string, string>;
autoDNS?: boolean;
}
export interface IAppMeta {
id: string;
name: string;
@@ -76,6 +88,20 @@ export interface IReq_GetAppConfig extends plugins.typedrequestInterfaces.implem
};
}
export interface IReq_InstallAppTemplate extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_InstallAppTemplate
> {
method: 'installAppTemplate';
request: {
identity: data.IIdentity;
install: IAppInstallOptions;
};
response: {
service: data.IService;
};
}
export interface IReq_GetUpgradeableServices extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_GetUpgradeableServices