任务一完成

This commit is contained in:
Yvan 2026-01-07 10:20:55 +08:00
parent 5fa7a41352
commit d572a03654
1 changed files with 184 additions and 8 deletions

View File

@ -1,3 +1,6 @@
# Kratos Admin Configuration
# server configuration
server:
http:
addr: 0.0.0.0:8000
@ -5,11 +8,184 @@ server:
grpc:
addr: 0.0.0.0:9000
timeout: 1s
data:
database:
driver: mysql
source: root:root@tcp(127.0.0.1:3306)/test?timeout=5s&parseTime=True&loc=Local&charset=utf8mb4
redis:
addr: 127.0.0.1:6379
read_timeout: 0.2s
write_timeout: 0.2s
# jwt configuration
jwt:
signing-key: kratos-admin
expires-time: 7d
buffer-time: 1d
issuer: kratos-admin
# system configuration
system:
env: local
db-type: mysql
oss-type: local
use-redis: false
use-multipoint: false
iplimit-count: 15000
iplimit-time: 3600
router-prefix: ""
use-strict-auth: false
# captcha configuration
captcha:
key-long: 6
img-width: 240
img-height: 80
open-captcha: 0
open-captcha-timeout: 3600
# mysql configuration
mysql:
path: 127.0.0.1
port: "3306"
config: charset=utf8mb4&parseTime=True&loc=Local
db-name: kratos_admin
username: root
password: root
max-idle-conns: 10
max-open-conns: 100
log-mode: info
log-zap: false
# pgsql configuration
pgsql:
path: ""
port: ""
config: ""
db-name: ""
username: ""
password: ""
max-idle-conns: 10
max-open-conns: 100
log-mode: ""
log-zap: false
# sqlite configuration
sqlite:
path: ""
db-name: ""
max-idle-conns: 10
max-open-conns: 100
log-mode: ""
log-zap: false
# redis configuration
redis:
use-cluster: false
addr: 127.0.0.1:6379
password: ""
db: 0
cluster-addrs:
- "127.0.0.1:7000"
- "127.0.0.1:7001"
- "127.0.0.1:7002"
# local storage configuration
local:
path: uploads/file
store-path: uploads/file
# qiniu configuration
qiniu:
zone: ZoneHuaDong
bucket: ""
img-path: ""
use-https: false
access-key: ""
secret-key: ""
use-cdn-domains: false
# minio configuration
minio:
endpoint: ""
access-key-id: ""
access-key-secret: ""
bucket-name: ""
use-ssl: false
base-path: ""
bucket-url: ""
# aliyun oss configuration
aliyun-oss:
endpoint: ""
access-key-id: ""
access-key-secret: ""
bucket-name: ""
bucket-url: ""
base-path: ""
# tencent cos configuration
tencent-cos:
bucket: ""
region: ""
secret-id: ""
secret-key: ""
base-url: ""
path-prefix: ""
# aws s3 configuration
aws-s3:
bucket: ""
region: ""
endpoint: ""
s3-force-path-style: false
disable-ssl: false
secret-id: ""
secret-key: ""
base-url: ""
path-prefix: ""
# cloudflare r2 configuration
cloudflare-r2:
bucket: ""
base-url: ""
path: uploads
account-id: ""
access-key-id: ""
secret-access-key: ""
# huawei obs configuration
huawei-obs:
path: ""
bucket: ""
endpoint: ""
access-key: ""
secret-key: ""
# email configuration
email:
to: ""
port: 465
from: ""
host: ""
is-ssl: true
secret: ""
nickname: ""
# excel configuration
excel:
dir: ./resource/excel/
# cors configuration
cors:
mode: allow-all
whitelist:
- allow-origin: "*"
allow-headers: Content-Type,AccessToken,X-CSRF-Token,Authorization,Token,X-Token,X-User-Id
allow-methods: POST,GET,OPTIONS,DELETE,PUT
expose-headers: Content-Length,Access-Control-Allow-Origin,Access-Control-Allow-Headers,Content-Type
allow-credentials: true
# zap logger configuration
zap:
level: info
format: console
prefix: "[kratos-admin]"
director: log
show-line: true
encode-level: LowercaseColorLevelEncoder
stacktrace-key: stacktrace
log-in-console: true
retention-day: -1