✨ [2025-01-07] 添加 Linkwarden、集简云对接、Yearning部署指南
Some checks failed
Publish to Confluence / confluence (push) Failing after 37s
Some checks failed
Publish to Confluence / confluence (push) Failing after 37s
This commit is contained in:
parent
ee5db82820
commit
09d7bca3fe
@ -71,32 +71,32 @@ services:
|
||||
|
||||
#### `conf.toml` 文件
|
||||
|
||||
```java
|
||||
```toml
|
||||
[Mysql]
|
||||
Db ="Yearning"
|
||||
Host ="127.0.0.1"
|
||||
Port ="3306"
|
||||
Password =""
|
||||
User ="root"
|
||||
Db = "Yearning"
|
||||
Host = "127.0.0.1"
|
||||
Port = "3306"
|
||||
Password = ""
|
||||
User = "root"
|
||||
|
||||
[General]
|
||||
SecretKey ="dbcjqheupqjsuwsm"
|
||||
Hours =4
|
||||
Lang="zh_CN"
|
||||
[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"
|
||||
[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 配置
|
||||
@ -105,20 +105,20 @@ SessionKey ="session_state"
|
||||
|
||||
#### 修改 `conf.toml`(Keycloak示例)
|
||||
|
||||
```java
|
||||
```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"
|
||||
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`
|
||||
@ -206,7 +206,7 @@ npm -v
|
||||
|
||||
### Yearning 源码安装
|
||||
|
||||
- 工作目录: `/usr/local/workspace`
|
||||
- 工作目录 `/usr/local/workspace`
|
||||
|
||||
#### 获取 Yearning
|
||||
|
||||
@ -243,18 +243,18 @@ go mod tidy
|
||||
|
||||
cp conf.toml.template conf.toml
|
||||
|
||||
# 修改 配置文件
|
||||
#- 修改 配置文件
|
||||
vi conf.toml
|
||||
|
||||
# 初始化(第一次需要)
|
||||
# go run main.go install
|
||||
#- 初始化(第一次需要)
|
||||
#- go run main.go install
|
||||
|
||||
# 启动
|
||||
#- 启动
|
||||
go run main.go run
|
||||
```
|
||||
|
||||
- 启动报错,chat/* xxx
|
||||
- `vi src/service/yearning.go`
|
||||
- 启动报错 `chat/* xxx`
|
||||
- 编辑文件 `vi src/service/yearning.go`
|
||||
- 删除报错提示的行相关的代码
|
||||
|
||||
## 参考
|
||||
|
Loading…
x
Reference in New Issue
Block a user