mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-17 16:56:38 +08:00
docs: update build script
This commit is contained in:
parent
7b0fa862d2
commit
9f98660423
@ -21,6 +21,9 @@ func NewGormConfig() *gorm.Config {
|
|||||||
|
|
||||||
func NewMysql(config *gorm.Config, appConfig *types.AppConfig) (*gorm.DB, error) {
|
func NewMysql(config *gorm.Config, appConfig *types.AppConfig) (*gorm.DB, error) {
|
||||||
db, err := gorm.Open(mysql.Open(appConfig.MysqlDns), config)
|
db, err := gorm.Open(mysql.Open(appConfig.MysqlDns), config)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
sqlDB, err := db.DB()
|
sqlDB, err := db.DB()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -29,8 +32,6 @@ func NewMysql(config *gorm.Config, appConfig *types.AppConfig) (*gorm.DB, error)
|
|||||||
sqlDB.SetMaxIdleConns(32)
|
sqlDB.SetMaxIdleConns(32)
|
||||||
sqlDB.SetMaxOpenConns(512)
|
sqlDB.SetMaxOpenConns(512)
|
||||||
sqlDB.SetConnMaxLifetime(time.Hour)
|
sqlDB.SetConnMaxLifetime(time.Hour)
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return db, nil
|
return db, nil
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ make clean linux
|
|||||||
cd ../web
|
cd ../web
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
cd ../docker
|
cd ../build
|
||||||
|
|
||||||
# remove docker image if exists
|
# remove docker image if exists
|
||||||
docker rmi -f registry.cn-shenzhen.aliyuncs.com/geekmaster/chatgpt-plus-api:$version
|
docker rmi -f registry.cn-shenzhen.aliyuncs.com/geekmaster/chatgpt-plus-api:$version
|
||||||
|
Loading…
Reference in New Issue
Block a user