mirror of
https://gitee.com/qqtt-ah/ai-crm.git
synced 2026-11-24 12:29:20 +08:00
init
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
export type Environment = 'test' | 'pre' | 'prod';
|
||||
export type Service = 'frontend' | 'backend' | 'license' | 'agent';
|
||||
|
||||
export interface ServerConfig {
|
||||
host: string;
|
||||
port: number;
|
||||
username: string;
|
||||
/** 部署根目录;实际路径为 {deployPath}/ecom-dmb/{service}/{env} */
|
||||
deployPath: string;
|
||||
authType: 'password' | 'key';
|
||||
keyPath?: string;
|
||||
lastPassword?: string;
|
||||
}
|
||||
|
||||
export interface ServiceEnvConfig {
|
||||
server: ServerConfig;
|
||||
port: number;
|
||||
springProfile?: string;
|
||||
nodeEnv?: string;
|
||||
dbUrl?: string;
|
||||
redisUrl?: string;
|
||||
licenseDbUrl?: string;
|
||||
/** 仅静态文件部署(不启动 Docker),前端常用 */
|
||||
staticDeploy?: boolean;
|
||||
/** @deprecated 改用 staticDeploy;若存在则仍视为静态部署 */
|
||||
extractDir?: string;
|
||||
}
|
||||
|
||||
export interface DeployConfig {
|
||||
currentEnv: Environment;
|
||||
services: Record<Service, Record<Environment, ServiceEnvConfig>>;
|
||||
}
|
||||
|
||||
export const SERVICE_LABELS: Record<Service, string> = {
|
||||
frontend: '前端',
|
||||
backend: '后端',
|
||||
license: '许可证',
|
||||
agent: '智能体',
|
||||
};
|
||||
|
||||
export const ENV_LABELS: Record<Environment, string> = {
|
||||
test: '测试',
|
||||
pre: '预发',
|
||||
prod: '生产',
|
||||
};
|
||||
Reference in New Issue
Block a user