diff --git a/config.example.yml b/config.example.yml index 0f1617a1..5edf244d 100644 --- a/config.example.yml +++ b/config.example.yml @@ -3,7 +3,6 @@ app: key: a-long-string-with-32-characters locale: zh_CN timezone: Asia/Shanghai - root: /www http: debug: false port: 8888 diff --git a/internal/biz/website.go b/internal/biz/website.go index 9a791372..f5f00e95 100644 --- a/internal/biz/website.go +++ b/internal/biz/website.go @@ -11,7 +11,7 @@ import ( type Website struct { ID uint `gorm:"primaryKey" json:"id"` Name string `gorm:"not null;default:'';unique" json:"name"` - Type string `gorm:"not null;default:'php'" json:"type"` + Type string `gorm:"not null;default:'static'" json:"type"` Status bool `gorm:"not null;default:true" json:"status"` Path string `gorm:"not null;default:''" json:"path"` Https bool `gorm:"not null;default:false" json:"https"` diff --git a/internal/bootstrap/conf.go b/internal/bootstrap/conf.go index 6cae6e11..a76ebca1 100644 --- a/internal/bootstrap/conf.go +++ b/internal/bootstrap/conf.go @@ -13,7 +13,7 @@ import ( ) func NewConf() (*koanf.Koanf, error) { - config := "/usr/local/etc/panel/config.yml" + config := "/opt/ace/panel/config.yml" if !io.Exists(config) { config = "config.yml" } @@ -33,7 +33,7 @@ func initGlobal(conf *koanf.Koanf) { log.Fatalf("panel app key must be 32 characters") } - app.Root = conf.MustString("app.root") + app.Root = "/opt/ace" app.Locale = conf.MustString("app.locale") // 初始化时区