mirror of
				https://github.com/yangjian102621/geekai.git
				synced 2025-11-04 08:13:43 +08:00 
			
		
		
		
	merge release v4.1.7
This commit is contained in:
		@@ -15,12 +15,6 @@ import (
 | 
			
		||||
	"geekai/store/model"
 | 
			
		||||
	"geekai/utils"
 | 
			
		||||
	"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/jpeg"
 | 
			
		||||
	"io"
 | 
			
		||||
@@ -29,6 +23,15 @@ import (
 | 
			
		||||
	"runtime/debug"
 | 
			
		||||
	"strings"
 | 
			
		||||
	"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 {
 | 
			
		||||
@@ -71,6 +74,25 @@ func (s *AppServer) Run(db *gorm.DB) error {
 | 
			
		||||
		return fmt.Errorf("failed to decode system config: %v", err)
 | 
			
		||||
	}
 | 
			
		||||
	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)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -173,7 +173,7 @@ func main() {
 | 
			
		||||
		// License 服务
 | 
			
		||||
		fx.Provide(service.NewLicenseService),
 | 
			
		||||
		fx.Invoke(func(licenseService *service.LicenseService) {
 | 
			
		||||
			licenseService.SyncLicense()
 | 
			
		||||
			// licenseService.SyncLicense()
 | 
			
		||||
		}),
 | 
			
		||||
 | 
			
		||||
		// MidJourney service pool
 | 
			
		||||
 
 | 
			
		||||
@@ -20,7 +20,7 @@ TikaHost = "http://tika:9998"
 | 
			
		||||
  DB = 0
 | 
			
		||||
 | 
			
		||||
[ApiConfig]
 | 
			
		||||
  ApiURL = "http://sapi.geekai.me"
 | 
			
		||||
  ApiURL = "https://sapi.geekai.me"
 | 
			
		||||
  AppId = ""
 | 
			
		||||
  Token = ""
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -68,7 +68,7 @@ services:
 | 
			
		||||
 | 
			
		||||
    # 后端 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
 | 
			
		||||
    restart: always
 | 
			
		||||
    depends_on:
 | 
			
		||||
@@ -92,7 +92,7 @@ services:
 | 
			
		||||
 | 
			
		||||
  # 前端应用
 | 
			
		||||
  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
 | 
			
		||||
    restart: always
 | 
			
		||||
    depends_on:
 | 
			
		||||
 
 | 
			
		||||
@@ -6,6 +6,6 @@ VUE_APP_ADMIN_USER=admin
 | 
			
		||||
VUE_APP_ADMIN_PASS=admin123
 | 
			
		||||
VUE_APP_KEY_PREFIX=GeekAI_DEV_
 | 
			
		||||
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_GIT_URL=https://github.com/yangjian102621/geekai
 | 
			
		||||
 
 | 
			
		||||
@@ -2,6 +2,6 @@ VUE_APP_API_HOST=
 | 
			
		||||
VUE_APP_WS_HOST=
 | 
			
		||||
VUE_APP_KEY_PREFIX=GeekAI_
 | 
			
		||||
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_GIT_URL=https://github.com/yangjian102621/geekai
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user