forked from linux-do/cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
111 lines (100 loc) · 2.42 KB
/
config.example.yaml
File metadata and controls
111 lines (100 loc) · 2.42 KB
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
# LINUX DO CDK Config
# Copy to config.yaml for runtime
# App
app:
app_name: "linux-do-cdk"
env: "development" # development, testing, production
addr: ":8000"
session_cookie_name: "linux_do_cdk_session_id" # change this in local dev env
session_secret: "<uniq string>" # you can't change this after first time start
session_domain: ".linux.do"
session_age: 86400
session_secure: false
session_http_only: false
api_prefix: "/api"
# projectApp
projectApp:
hidden_threshold: 5 # project hidden threshold
deduction_per_offense: 5 # deduction per offense
# rate limit for creating projects for level 0-4
create_project_rate_limit:
- interval_seconds: 60
max_count: 1
- interval_seconds: 60
max_count: 3
- interval_seconds: 60
max_count: 5
- interval_seconds: 60
max_count: 10
- interval_seconds: 60
max_count: 20
# OAuth2
oauth2:
client_id: "<OAUTH2_CLIENT_ID>"
client_secret: "<OAUTH2_CLIENT_SECRET>"
redirect_uri: "<OAUTH2_REDIRECT_URI>"
# alternative domain: connect.linuxdo.org
authorization_endpoint: "https://connect.linux.do/oauth2/authorize"
token_endpoint: "https://connect.linux.do/oauth2/token"
user_endpoint: "https://connect.linux.do/api/user"
# DB
database:
enabled: true
host: "127.0.0.1"
port: 3306
username: "root"
password: ""
database: "linux_do_cdk"
max_idle_conn: 10
max_open_conn: 100
conn_max_lifetime: 3600
log_level: "info" # error, warn, info, debug, silent
# clickhouse
clickhouse:
enabled: false
hosts:
- "127.0.0.1:9000"
username: "default"
password: ""
database: "linux_do_cdk"
max_idle_conn: 10
max_open_conn: 100
conn_max_lifetime: 3600
dial_timeout: 5
# Redis config
redis:
enabled: true
host: "127.0.0.1"
port: 6379
username: ""
password: ""
db: 0
pool_size: 100
min_idle_conn: 10
dial_timeout: 5
read_timeout: 3
write_timeout: 3
# Log
log:
level: "info" # debug, info, warn, error, fatal, panic
format: "json" # text, json
output: "stdout" # stdout, file
file_path: "./logs/app.log"
max_size: 100
max_age: 30
max_backups: 10
compress: true
# Schedule
schedule:
user_badge_score_dispatch_interval_seconds: 1
update_user_badges_scores_task_cron: "0 2 * * *"
update_all_badges_task_cron: "0 1 * * *"
# Worker
worker:
concurrency: 50
# linuxDo
linuxDo:
api_key: "<LINUX_DO_API_KEY>"
# OpenTelemetry 配置
otel:
sampling_rate: 0.1 # 采样率 0.0-1.0