✨ [2025-01-07] 添加 Linkwarden、集简云对接、Yearning部署指南
Some checks failed
Publish to Confluence / confluence (push) Failing after 38s
Some checks failed
Publish to Confluence / confluence (push) Failing after 38s
This commit is contained in:
parent
8ba95e191b
commit
d6f4b9ea21
@ -28,47 +28,64 @@
|
|||||||
|
|
||||||
### Docker Compose
|
### Docker Compose
|
||||||
|
|
||||||
#### `docker-compose.yml` 文件
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
version: '3'
|
|
||||||
|
|
||||||
services:
|
#### `conf.toml` 文件
|
||||||
yearning:
|
|
||||||
image: yeelabs/yearning:v3.1.5
|
|
||||||
environment:
|
|
||||||
MYSQL_USER: yearning
|
|
||||||
MYSQL_PASSWORD: ukC2ZkcG_ZTeb
|
|
||||||
MYSQL_ADDR: mysql
|
|
||||||
MYSQL_DB: yearning
|
|
||||||
SECRET_KEY: dbcjqheupqjsuwsm
|
|
||||||
IS_DOCKER: is_docker
|
|
||||||
ports:
|
|
||||||
- 8000:8000
|
|
||||||
volumes:
|
|
||||||
- ./opt/conf.toml:/opt/conf.toml
|
|
||||||
#- 首次使用请先初始化
|
|
||||||
#- command: /bin/bash -c "./Yearning install && ./Yearning run"
|
|
||||||
depends_on:
|
|
||||||
- mysql
|
|
||||||
restart: always
|
|
||||||
|
|
||||||
mysql:
|
```toml
|
||||||
image: mysql:5.7
|
[Mysql]
|
||||||
environment:
|
Db = "Yearning"
|
||||||
MYSQL_ROOT_PASSWORD: ukC2ZkcG_ZTeb
|
Host = "127.0.0.1"
|
||||||
MYSQL_DATABASE: yearning
|
Port = "3306"
|
||||||
MYSQL_USER: yearning
|
Password = ""
|
||||||
MYSQL_PASSWORD: ukC2ZkcG_ZTeb
|
User = "root"
|
||||||
command:
|
|
||||||
- --character-set-server=utf8mb4
|
|
||||||
- --collation-server=utf8mb4_general_ci
|
|
||||||
volumes:
|
|
||||||
- ./data/mysql:/var/lib/mysql
|
|
||||||
|
|
||||||
#- 默认账号:admin,默认密码:Yearning_admin
|
[General]
|
||||||
|
SecretKey = "dbcjqheupqjsuwsm"
|
||||||
|
Hours = 4
|
||||||
|
Lang = "zh_CN"
|
||||||
|
|
||||||
|
[Oidc]
|
||||||
|
Enable = false
|
||||||
|
ClientId = "${keycloak的客户端ID}"
|
||||||
|
ClientSecret = "${keycloak的客户端Secret}"
|
||||||
|
Scope = "openid profile"
|
||||||
|
AuthUrl = "${issuer链接}/protocol/openid-connect/auth"
|
||||||
|
TokenUrl = "${issuer链接}/protocol/openid-connect/token"
|
||||||
|
UserUrl = "${issuer链接}/protocol/openid-connect/userinfo"
|
||||||
|
RedirectUrL = "${yearning的地址}/oidc/_token-login"
|
||||||
|
UserNameKey = "preferred_username"
|
||||||
|
RealNameKey = "name"
|
||||||
|
EmailKey = "email"
|
||||||
|
SessionKey = "session_state"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Yearning OIDC 配置
|
||||||
|
|
||||||
|
- 可以参考:https://next.yearning.io/zh/usage/boccobus/
|
||||||
|
|
||||||
|
#### 修改 `conf.toml`(Keycloak示例)
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[Oidc]
|
||||||
|
Enable = true
|
||||||
|
ClientId = "${keycloak的客户端ID}"
|
||||||
|
ClientSecret = "${keycloak的客户端Secret}"
|
||||||
|
Scope = "openid profile"
|
||||||
|
AuthUrl = "${issuer链接}/protocol/openid-connect/auth"
|
||||||
|
TokenUrl = "${issuer链接}/protocol/openid-connect/token"
|
||||||
|
UserUrl = "${issuer链接}/protocol/openid-connect/userinfo"
|
||||||
|
RedirectUrL = "${yearning的地址}/oidc/_token-login"
|
||||||
|
UserNameKey = "preferred_username"
|
||||||
|
RealNameKey = "name"
|
||||||
|
EmailKey = "email"
|
||||||
|
SessionKey = "session_state"
|
||||||
|
```
|
||||||
|
|
||||||
|
- ${keycloak的客户端ID}:例如 `yearning`
|
||||||
|
- ${keycloak的客户端Secret}: Keycloak中获取
|
||||||
|
- ${issuer链接}: Keycloak 中获取
|
||||||
|
- ${yearning的地址}:yearning 请求地址
|
||||||
|
|
||||||
### 异常处理
|
### 异常处理
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user