1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Copyright © 2025-2026 Wenze Wei. All Rights Reserved.
#
# This file is part of Ri.
# The Ri project belongs to the Dunimd Team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =============================================================================
# Authentication Configuration
# =============================================================================
auth:
enabled: true
jwt_secret: "your-secret-key-change-in-production"
jwt_expiry_secs: 3600
session_timeout_secs: 86400
oauth_providers:
enable_api_keys: true
enable_session_auth: true
oauth_cache_backend_type: "Memory"
oauth_cache_redis_url: "redis://127.0.0.1:6379"
# =============================================================================
# Cache Configuration
# =============================================================================
cache:
enabled: true
default_ttl_secs: 3600
max_memory_mb: 512
cleanup_interval_secs: 300
backend_type: "Memory"
redis_url: "redis://127.0.0.1:6379"
redis_pool_size: 10
# =============================================================================
# Logging Configuration
# =============================================================================
logging:
level: "INFO"
console_enabled: true
file_enabled: true
sampling_default: 1.0
file_name: "app.log"
json_format: false
rotate_when: "size"
max_bytes: 10485760
color_blocks: true
# =============================================================================
# Gateway Configuration
# =============================================================================
gateway:
listen_address: "0.0.0.0"
listen_port: 8080
max_connections: 1000
request_timeout_seconds: 30
enable_rate_limiting: true
enable_circuit_breaker: true
enable_load_balancing: true
cors_enabled: true
cors_origins:
- "*"
cors_methods:
- "GET"
- "POST"
- "PUT"
- "DELETE"
cors_headers:
- "Content-Type"
- "Authorization"
enable_logging: true
log_level: "INFO"
# =============================================================================
# Database Configuration
# =============================================================================
database:
database_type: "SQLite"
host: "localhost"
port: 5432
database: ".dms/data/ri.db"
username: ""
password: ""
max_connections: 10
min_idle_connections: 1
connection_timeout_secs: 30
idle_timeout_secs: 600
max_lifetime_secs: 1800
ssl_mode: "Disable"
# =============================================================================
# Queue Configuration
# =============================================================================
queue:
enabled: true
backend_type: "Memory"
connection_string: "memory://localhost"
max_connections: 10
message_max_size: 1048576
consumer_timeout_ms: 30000
producer_timeout_ms: 5000
retry_policy:
max_retries: 3
initial_delay_ms: 100
max_delay_ms: 5000
multiplier: 2.0
dead_letter_config:
enabled: true
queue_name: "dead_letter"
max_retention_secs: 86400
# =============================================================================
# Observability Configuration
# =============================================================================
observability:
tracing_enabled: true
metrics_enabled: true
tracing_sampling_rate: 0.1
tracing_sampling_strategy: "rate"
metrics_window_size_secs: 300
metrics_bucket_size_secs: 10