kra-oa/configs/config.yaml

236 lines
5.2 KiB
YAML

server:
http:
network: tcp
addr: 0.0.0.0:8000
timeout: 600s
data:
database:
driver: mysql
source: root:root@tcp(127.0.0.1:3306)/kra?timeout=5s&parseTime=True&loc=Local&charset=utf8mb4
host: 127.0.0.1
port: "3306"
user: root
password: "12345678"
name: kra
config: timeout=5s&parseTime=True&loc=Local&charset=utf8mb4
path: ""
alias_name: ""
disable: false
prefix: ""
engine: InnoDB
log_mode: info
max_idle_conns: 10
max_open_conns: 100
conn_max_lifetime: 3600
singular: false
redis:
network: tcp
name: default
addr: 127.0.0.1:6379
password: ""
db: 0
use_cluster: false
cluster_addrs: []
read_timeout: 0.2s
write_timeout: 0.2s
# Additional databases use alias_name as the lookup key. Disabled entries
# remain available as configuration examples without opening connections.
database_list: []
# Example:
# database_list:
# - driver: mysql
# source: ""
# host: 127.0.0.1
# port: "3306"
# user: root
# password: ""
# name: business
# config: timeout=5s&parseTime=True&loc=Local&charset=utf8mb4
# path: ""
# alias_name: business
# disable: true
# prefix: ""
# engine: InnoDB
# log_mode: info
# max_idle_conns: 10
# max_open_conns: 100
# conn_max_lifetime: 3600
# singular: false
redis_list: []
# Example:
# redis_list:
# - network: tcp
# name: cache
# addr: 127.0.0.1:6379
# password: ""
# db: 0
# use_cluster: false
# cluster_addrs: []
# read_timeout: 0.2s
# write_timeout: 0.2s
mongo:
coll: ""
options: ""
database: ""
username: ""
password: ""
auth_source: ""
min_pool_size: 0
max_pool_size: 100
socket_timeout_ms: 0
connect_timeout_ms: 0
is_zap: false
hosts:
- host: ""
port: ""
admin:
# The administration system router prefix maps to this transport prefix.
router_prefix: ""
jwt:
# Production deployments must override this value with a private secret.
signing_key: change-me-before-production
expires_time: 604800s
buffer_time: 86400s
issuer: kra
captcha:
key_long: 6
img_width: 240
img_height: 80
store_expiration: 180s
local:
store_path: uploads/file
path_prefix: uploads/file
media:
# Upload chunks are stored below .chunks in the selected storage backend.
session_ttl: 24
max_file_size: 0
chunk_dir: uploads/chunks
system:
use_redis: false
use_multipoint: false
use_strict_auth: false
disable_auto_migrate: false
use_mongo: false
addr: 8000
iplimit_count: 0
iplimit_time: 0
zap:
level: info
prefix: "[kra] "
format: json
director: logs
encode_level: LowercaseLevelEncoder
stacktrace_key: stacktrace
show_line: true
log_in_console: true
retention_day: 7
access_req_body: true
access_resp_data: true
access_req_headers: true
access_log_max_bytes: 1024
file_only_modules: []
cors:
mode: whitelist
whitelist: []
# Example:
# whitelist:
# - allow_origin: https://admin.example.com
# allow_headers: Content-Type,Authorization,X-Token,X-User-Id
# allow_methods: POST,GET,PUT,DELETE,OPTIONS
# expose_headers: Content-Length,Content-Type
# allow_credentials: true
app:
node: ""
app_id: kra
env: development
disk_list:
- mount_point: /
storage:
# local, qiniu, aliyun-oss, huawei-obs, tencent-cos, aws-s3,
# cloudflare-r2 or minio
type: local
qiniu:
zone: ZoneHuadong
bucket: ""
base_url: ""
access_key: ""
secret_key: ""
use_https: false
use_cdn_domains: false
aliyun_oss:
endpoint: ""
region: ""
bucket: ""
access_key: ""
secret_key: ""
base_url: ""
path_prefix: ""
use_ssl: true
force_path_style: false
account_id: ""
huawei_obs:
endpoint: ""
region: ""
bucket: ""
access_key: ""
secret_key: ""
base_url: ""
path_prefix: ""
use_ssl: true
force_path_style: false
account_id: ""
tencent_cos:
endpoint: ""
region: ""
bucket: ""
access_key: ""
secret_key: ""
base_url: ""
path_prefix: ""
use_ssl: true
force_path_style: false
account_id: ""
aws_s3:
endpoint: ""
region: ""
bucket: ""
access_key: ""
secret_key: ""
base_url: ""
path_prefix: ""
use_ssl: true
force_path_style: false
account_id: ""
cloudflare_r2:
endpoint: ""
region: auto
bucket: ""
access_key: ""
secret_key: ""
base_url: ""
path_prefix: uploads
use_ssl: true
force_path_style: false
account_id: ""
minio:
endpoint: ""
region: ""
bucket: ""
access_key: ""
secret_key: ""
base_url: ""
path_prefix: ""
use_ssl: false
force_path_style: true
account_id: ""
email:
# Leave host/from/secret empty to disable SMTP error notifications.
to: ""
from: ""
host: ""
secret: ""
nickname: ""
port: 465
is_ssl: true
is_login_auth: false