mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-17 16:56:38 +08:00
merge release v4.1.7
This commit is contained in:
parent
1b1c327c35
commit
805c2a045e
@ -15,12 +15,6 @@ import (
|
|||||||
"geekai/store/model"
|
"geekai/store/model"
|
||||||
"geekai/utils"
|
"geekai/utils"
|
||||||
"geekai/utils/resp"
|
"geekai/utils/resp"
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
"github.com/go-redis/redis/v8"
|
|
||||||
"github.com/golang-jwt/jwt/v5"
|
|
||||||
"github.com/nfnt/resize"
|
|
||||||
"golang.org/x/image/webp"
|
|
||||||
"gorm.io/gorm"
|
|
||||||
"image"
|
"image"
|
||||||
"image/jpeg"
|
"image/jpeg"
|
||||||
"io"
|
"io"
|
||||||
@ -29,6 +23,15 @@ import (
|
|||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/go-redis/redis/v8"
|
||||||
|
"github.com/golang-jwt/jwt/v5"
|
||||||
|
"github.com/imroc/req/v3"
|
||||||
|
"github.com/nfnt/resize"
|
||||||
|
"github.com/shirou/gopsutil/host"
|
||||||
|
"golang.org/x/image/webp"
|
||||||
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AppServer struct {
|
type AppServer struct {
|
||||||
@ -71,6 +74,25 @@ func (s *AppServer) Run(db *gorm.DB) error {
|
|||||||
return fmt.Errorf("failed to decode system config: %v", err)
|
return fmt.Errorf("failed to decode system config: %v", err)
|
||||||
}
|
}
|
||||||
logger.Infof("http://%s", s.Config.Listen)
|
logger.Infof("http://%s", s.Config.Listen)
|
||||||
|
|
||||||
|
// 统计安装信息
|
||||||
|
go func() {
|
||||||
|
info, err := host.Info()
|
||||||
|
if err == nil {
|
||||||
|
apiURL := fmt.Sprintf("%s/%s", s.Config.ApiConfig.ApiURL, "api/installs/push")
|
||||||
|
timestamp := time.Now().Unix()
|
||||||
|
product := "geekai-plus"
|
||||||
|
signStr := fmt.Sprintf("%s#%s#%d", product, info.HostID, timestamp)
|
||||||
|
sign := utils.Sha256(signStr)
|
||||||
|
resp, err := req.C().R().SetBody(map[string]interface{}{"product": product, "device_id": info.HostID, "timestamp": timestamp, "sign": sign}).Post(apiURL)
|
||||||
|
if err != nil {
|
||||||
|
logger.Errorf("register install info failed: %v", err)
|
||||||
|
} else {
|
||||||
|
logger.Debugf("register install info success: %v", resp.String())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
return s.Engine.Run(s.Config.Listen)
|
return s.Engine.Run(s.Config.Listen)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ func main() {
|
|||||||
// License 服务
|
// License 服务
|
||||||
fx.Provide(service.NewLicenseService),
|
fx.Provide(service.NewLicenseService),
|
||||||
fx.Invoke(func(licenseService *service.LicenseService) {
|
fx.Invoke(func(licenseService *service.LicenseService) {
|
||||||
licenseService.SyncLicense()
|
// licenseService.SyncLicense()
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// MidJourney service pool
|
// MidJourney service pool
|
||||||
|
@ -20,7 +20,7 @@ TikaHost = "http://tika:9998"
|
|||||||
DB = 0
|
DB = 0
|
||||||
|
|
||||||
[ApiConfig]
|
[ApiConfig]
|
||||||
ApiURL = "http://sapi.geekai.me"
|
ApiURL = "https://sapi.geekai.me"
|
||||||
AppId = ""
|
AppId = ""
|
||||||
Token = ""
|
Token = ""
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ services:
|
|||||||
|
|
||||||
# 后端 API 程序
|
# 后端 API 程序
|
||||||
geekai-api:
|
geekai-api:
|
||||||
image: registry.cn-shenzhen.aliyuncs.com/geekmaster/geekai-api:v4.1.6-amd64
|
image: registry.cn-shenzhen.aliyuncs.com/geekmaster/geekai-api:v4.1.7-amd64
|
||||||
container_name: geekai-api
|
container_name: geekai-api
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -92,7 +92,7 @@ services:
|
|||||||
|
|
||||||
# 前端应用
|
# 前端应用
|
||||||
geekai-web:
|
geekai-web:
|
||||||
image: registry.cn-shenzhen.aliyuncs.com/geekmaster/geekai-web:v4.1.6-amd64
|
image: registry.cn-shenzhen.aliyuncs.com/geekmaster/geekai-web:v4.1.7-amd64
|
||||||
container_name: geekai-web
|
container_name: geekai-web
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@ -6,6 +6,6 @@ VUE_APP_ADMIN_USER=admin
|
|||||||
VUE_APP_ADMIN_PASS=admin123
|
VUE_APP_ADMIN_PASS=admin123
|
||||||
VUE_APP_KEY_PREFIX=GeekAI_DEV_
|
VUE_APP_KEY_PREFIX=GeekAI_DEV_
|
||||||
VUE_APP_TITLE="Geek-AI 创作系统"
|
VUE_APP_TITLE="Geek-AI 创作系统"
|
||||||
VUE_APP_VERSION=v4.1.6
|
VUE_APP_VERSION=v4.1.7
|
||||||
VUE_APP_DOCS_URL=https://docs.geekai.me
|
VUE_APP_DOCS_URL=https://docs.geekai.me
|
||||||
VUE_APP_GIT_URL=https://github.com/yangjian102621/geekai
|
VUE_APP_GIT_URL=https://github.com/yangjian102621/geekai
|
||||||
|
@ -2,6 +2,6 @@ VUE_APP_API_HOST=
|
|||||||
VUE_APP_WS_HOST=
|
VUE_APP_WS_HOST=
|
||||||
VUE_APP_KEY_PREFIX=GeekAI_
|
VUE_APP_KEY_PREFIX=GeekAI_
|
||||||
VUE_APP_TITLE="Geek-AI 创作系统"
|
VUE_APP_TITLE="Geek-AI 创作系统"
|
||||||
VUE_APP_VERSION=v4.1.6
|
VUE_APP_VERSION=v4.1.7
|
||||||
VUE_APP_DOCS_URL=https://docs.geekai.me
|
VUE_APP_DOCS_URL=https://docs.geekai.me
|
||||||
VUE_APP_GIT_URL=https://github.com/yangjian102621/geekai
|
VUE_APP_GIT_URL=https://github.com/yangjian102621/geekai
|
||||||
|
Loading…
Reference in New Issue
Block a user