✨ [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` 文件
|
#### `conf.toml` 文件
|
||||||
|
|
||||||
```java
|
```toml
|
||||||
[Mysql]
|
[Mysql]
|
||||||
Db ="Yearning"
|
Db = "Yearning"
|
||||||
Host ="127.0.0.1"
|
Host = "127.0.0.1"
|
||||||
Port ="3306"
|
Port = "3306"
|
||||||
Password =""
|
Password = ""
|
||||||
User ="root"
|
User = "root"
|
||||||
|
|
||||||
[General]
|
[General]
|
||||||
SecretKey ="dbcjqheupqjsuwsm"
|
SecretKey = "dbcjqheupqjsuwsm"
|
||||||
Hours =4
|
Hours = 4
|
||||||
Lang="zh_CN"
|
Lang = "zh_CN"
|
||||||
|
|
||||||
[Oidc]
|
[Oidc]
|
||||||
Enable =false
|
Enable = false
|
||||||
ClientId ="${keycloak的客户端ID}"
|
ClientId = "${keycloak的客户端ID}"
|
||||||
ClientSecret ="${keycloak的客户端Secret}"
|
ClientSecret = "${keycloak的客户端Secret}"
|
||||||
Scope ="openid profile"
|
Scope = "openid profile"
|
||||||
AuthUrl ="${issuer链接}/protocol/openid-connect/auth"
|
AuthUrl = "${issuer链接}/protocol/openid-connect/auth"
|
||||||
TokenUrl ="${issuer链接}/protocol/openid-connect/token"
|
TokenUrl = "${issuer链接}/protocol/openid-connect/token"
|
||||||
UserUrl ="${issuer链接}/protocol/openid-connect/userinfo"
|
UserUrl = "${issuer链接}/protocol/openid-connect/userinfo"
|
||||||
RedirectUrL ="${yearning的地址}/oidc/_token-login"
|
RedirectUrL = "${yearning的地址}/oidc/_token-login"
|
||||||
UserNameKey ="preferred_username"
|
UserNameKey = "preferred_username"
|
||||||
RealNameKey ="name"
|
RealNameKey = "name"
|
||||||
EmailKey ="email"
|
EmailKey = "email"
|
||||||
SessionKey ="session_state"
|
SessionKey = "session_state"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Yearning OIDC 配置
|
### Yearning OIDC 配置
|
||||||
@ -105,20 +105,20 @@ SessionKey ="session_state"
|
|||||||
|
|
||||||
#### 修改 `conf.toml`(Keycloak示例)
|
#### 修改 `conf.toml`(Keycloak示例)
|
||||||
|
|
||||||
```java
|
```toml
|
||||||
[Oidc]
|
[Oidc]
|
||||||
Enable =true
|
Enable = true
|
||||||
ClientId ="${keycloak的客户端ID}"
|
ClientId = "${keycloak的客户端ID}"
|
||||||
ClientSecret ="${keycloak的客户端Secret}"
|
ClientSecret = "${keycloak的客户端Secret}"
|
||||||
Scope ="openid profile"
|
Scope = "openid profile"
|
||||||
AuthUrl ="${issuer链接}/protocol/openid-connect/auth"
|
AuthUrl = "${issuer链接}/protocol/openid-connect/auth"
|
||||||
TokenUrl ="${issuer链接}/protocol/openid-connect/token"
|
TokenUrl = "${issuer链接}/protocol/openid-connect/token"
|
||||||
UserUrl ="${issuer链接}/protocol/openid-connect/userinfo"
|
UserUrl = "${issuer链接}/protocol/openid-connect/userinfo"
|
||||||
RedirectUrL ="${yearning的地址}/oidc/_token-login"
|
RedirectUrL = "${yearning的地址}/oidc/_token-login"
|
||||||
UserNameKey ="preferred_username"
|
UserNameKey = "preferred_username"
|
||||||
RealNameKey ="name"
|
RealNameKey = "name"
|
||||||
EmailKey ="email"
|
EmailKey = "email"
|
||||||
SessionKey ="session_state"
|
SessionKey = "session_state"
|
||||||
```
|
```
|
||||||
|
|
||||||
- ${keycloak的客户端ID}:例如 `yearning`
|
- ${keycloak的客户端ID}:例如 `yearning`
|
||||||
@ -206,7 +206,7 @@ npm -v
|
|||||||
|
|
||||||
### Yearning 源码安装
|
### Yearning 源码安装
|
||||||
|
|
||||||
- 工作目录: `/usr/local/workspace`
|
- 工作目录 `/usr/local/workspace`
|
||||||
|
|
||||||
#### 获取 Yearning
|
#### 获取 Yearning
|
||||||
|
|
||||||
@ -243,18 +243,18 @@ go mod tidy
|
|||||||
|
|
||||||
cp conf.toml.template conf.toml
|
cp conf.toml.template conf.toml
|
||||||
|
|
||||||
# 修改 配置文件
|
#- 修改 配置文件
|
||||||
vi conf.toml
|
vi conf.toml
|
||||||
|
|
||||||
# 初始化(第一次需要)
|
#- 初始化(第一次需要)
|
||||||
# go run main.go install
|
#- go run main.go install
|
||||||
|
|
||||||
# 启动
|
#- 启动
|
||||||
go run main.go run
|
go run main.go run
|
||||||
```
|
```
|
||||||
|
|
||||||
- 启动报错,chat/* xxx
|
- 启动报错 `chat/* xxx`
|
||||||
- `vi src/service/yearning.go`
|
- 编辑文件 `vi src/service/yearning.go`
|
||||||
- 删除报错提示的行相关的代码
|
- 删除报错提示的行相关的代码
|
||||||
|
|
||||||
## 参考
|
## 参考
|
||||||
|
Loading…
x
Reference in New Issue
Block a user