From d572a03654c8d44622bbb91e3b9e22c7d1e4c360 Mon Sep 17 00:00:00 2001 From: Yvan <8574526@qq,com> Date: Wed, 7 Jan 2026 10:20:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E4=B8=80=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configs/config.yaml | 192 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 184 insertions(+), 8 deletions(-) diff --git a/configs/config.yaml b/configs/config.yaml index 5e5453e..9dc736e 100644 --- a/configs/config.yaml +++ b/configs/config.yaml @@ -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