feat: 新增部署脚本

This commit is contained in:
小蟑螂
2026-07-07 23:15:10 +08:00
parent dd8cba9777
commit 8af2e9194b
15 changed files with 2323 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
export type Environment = 'test' | 'pre' | 'production';
export type Service = 'frontend' | 'backend' | 'license';
export interface ServerConfig {
host: string;
port: number;
username: string;
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;
extractDir?: string;
}
export interface DeployConfig {
currentEnv: Environment;
services: Record<Service, Record<Environment, ServiceEnvConfig>>;
}
export const SERVICE_LABELS: Record<Service, string> = {
frontend: '前端',
backend: '后端',
license: '许可证服务',
};
export const ENV_LABELS: Record<Environment, string> = {
test: '测试环境',
pre: '预发布环境',
production: '生产环境',
};