2024-07-29 05:32:20 -07:00
|
|
|
import { Config, Env, Nested } from './decorators';
|
2024-07-05 02:43:27 -07:00
|
|
|
import { CredentialsConfig } from './configs/credentials';
|
|
|
|
import { DatabaseConfig } from './configs/database';
|
|
|
|
import { EmailConfig } from './configs/email';
|
2024-07-17 10:11:46 -07:00
|
|
|
import { VersionNotificationsConfig } from './configs/version-notifications';
|
2024-07-17 06:36:40 -07:00
|
|
|
import { PublicApiConfig } from './configs/public-api';
|
2024-07-18 01:52:41 -07:00
|
|
|
import { ExternalSecretsConfig } from './configs/external-secrets';
|
2024-07-19 01:33:28 -07:00
|
|
|
import { TemplatesConfig } from './configs/templates';
|
2024-07-19 04:25:44 -07:00
|
|
|
import { EventBusConfig } from './configs/event-bus';
|
2024-07-23 04:32:50 -07:00
|
|
|
import { NodesConfig } from './configs/nodes';
|
2024-07-24 04:08:20 -07:00
|
|
|
import { ExternalStorageConfig } from './configs/external-storage';
|
2024-07-24 05:38:29 -07:00
|
|
|
import { WorkflowsConfig } from './configs/workflows';
|
2024-07-05 02:43:27 -07:00
|
|
|
|
|
|
|
@Config
|
|
|
|
class UserManagementConfig {
|
|
|
|
@Nested
|
|
|
|
emails: EmailConfig;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Config
|
|
|
|
export class GlobalConfig {
|
|
|
|
@Nested
|
2024-07-24 04:08:20 -07:00
|
|
|
readonly database: DatabaseConfig;
|
2024-07-05 02:43:27 -07:00
|
|
|
|
|
|
|
@Nested
|
2024-07-24 04:08:20 -07:00
|
|
|
readonly credentials: CredentialsConfig;
|
2024-07-05 02:43:27 -07:00
|
|
|
|
|
|
|
@Nested
|
2024-07-24 04:08:20 -07:00
|
|
|
readonly userManagement: UserManagementConfig;
|
2024-07-17 06:36:40 -07:00
|
|
|
|
2024-07-17 10:11:46 -07:00
|
|
|
@Nested
|
2024-07-24 04:08:20 -07:00
|
|
|
readonly versionNotifications: VersionNotificationsConfig;
|
2024-07-17 10:11:46 -07:00
|
|
|
|
2024-07-17 06:36:40 -07:00
|
|
|
@Nested
|
2024-07-24 04:08:20 -07:00
|
|
|
readonly publicApi: PublicApiConfig;
|
2024-07-18 01:52:41 -07:00
|
|
|
|
|
|
|
@Nested
|
2024-07-24 04:08:20 -07:00
|
|
|
readonly externalSecrets: ExternalSecretsConfig;
|
2024-07-19 01:33:28 -07:00
|
|
|
|
|
|
|
@Nested
|
2024-07-24 04:08:20 -07:00
|
|
|
readonly templates: TemplatesConfig;
|
2024-07-19 04:25:44 -07:00
|
|
|
|
|
|
|
@Nested
|
2024-07-24 04:08:20 -07:00
|
|
|
readonly eventBus: EventBusConfig;
|
2024-07-23 04:32:50 -07:00
|
|
|
|
|
|
|
@Nested
|
|
|
|
readonly nodes: NodesConfig;
|
2024-07-24 04:08:20 -07:00
|
|
|
|
|
|
|
@Nested
|
|
|
|
readonly externalStorage: ExternalStorageConfig;
|
2024-07-24 05:38:29 -07:00
|
|
|
|
|
|
|
@Nested
|
|
|
|
readonly workflows: WorkflowsConfig;
|
2024-07-29 05:32:20 -07:00
|
|
|
|
|
|
|
/** Path n8n is deployed to */
|
|
|
|
@Env('N8N_PATH')
|
|
|
|
readonly path: string = '/';
|
|
|
|
|
|
|
|
/** Host name n8n can be reached */
|
|
|
|
@Env('N8N_HOST')
|
|
|
|
readonly host: string = 'localhost';
|
|
|
|
|
|
|
|
/** HTTP port n8n can be reached */
|
|
|
|
@Env('N8N_PORT')
|
|
|
|
readonly port: number = 5678;
|
|
|
|
|
|
|
|
/** IP address n8n should listen on */
|
|
|
|
@Env('N8N_LISTEN_ADDRESS')
|
|
|
|
readonly listen_address: string = '0.0.0.0';
|
|
|
|
|
|
|
|
/** HTTP Protocol via which n8n can be reached */
|
|
|
|
@Env('N8N_PROTOCOL')
|
|
|
|
readonly protocol: 'http' | 'https' = 'http';
|
2024-07-05 02:43:27 -07:00
|
|
|
}
|