donknap / dpanel

docker可视化管理面板
https://dpanel.cc
1.25k stars 87 forks source link

compose项目无法打开 #62

Closed dtapps closed 2 days ago

dtapps commented 3 days ago

当前使用的dpanel版本? 通过 【概览】- 【系统信息】- 【面板信息】 DPanel - 1.3.2 - lite Debian GNU/Linux 9 (stretch) - 19.03.15 - 1.40 DPanel - 1.3.2 - lite Ubuntu 22.04.2 LTS - 27.3.1 - 1.46

错误日志 【容器管理】 - 【容器列表】-【dpanel】-【运行日志】 或 docker logs dpanel [2024-11-30 14:49:52.183] [ERROR] default 系统内部错误: runtime error: index out of range [0] with length 0 /home/runner/go/pkg/mod/github.com/we7coreteam/w7-rangine-go/v2@v2.0.1/src/http/response/response.go:66 (0x106aed6) /home/runner/go/pkg/mod/github.com/we7coreteam/w7-rangine-go/v2@v2.0.1/src/http/response/response.go:60 (0x109ff0e) /home/runner/go/pkg/mod/github.com/we7coreteam/w7-rangine-go/v2@v2.0.1/src/http/middleware/panichandler.go:22 (0x109fed7) /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/recovery.go:98 (0x1034055) /opt/hostedtoolcache/go/1.23.3/x64/src/runtime/panic.go:785 (0x476fd1) /opt/hostedtoolcache/go/1.23.3/x64/src/runtime/panic.go:115 (0x43b573) /home/runner/work/dpanel/dpanel/app/application/logic/compose.go:293 (0x105c7e4) /home/runner/work/dpanel/dpanel/app/application/http/controller/compose.go:199 (0x1080432) /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x10a0b62) /home/runner/work/dpanel/dpanel/common/middleware/cors.go:26 (0x10a0b50) /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x10a09de) /home/runner/work/dpanel/dpanel/common/middleware/cache.go:23 (0x10a09cc) /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x10a0581) /home/runner/work/dpanel/dpanel/common/middleware/auth.go:62 (0x10a03ac) /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x103386e) /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/recovery.go:102 (0x103385b) /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x10326b1) /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633 (0x1032120) /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589 (0x1031c51) /opt/hostedtoolcache/go/1.23.3/x64/src/net/http/server.go:3210 (0x7e820d) /opt/hostedtoolcache/go/1.23.3/x64/src/net/http/server.go:2092 (0x7c772f) /opt/hostedtoolcache/go/1.23.3/x64/src/runtime/asm_amd64.s:1700 (0x47fbc0)

复现方式

1.2.5更新到1.3.2-lite后compose项目问题,随便打开一个都报错了

Q群反馈

Q群:837583876

donknap commented 2 days ago

因为之前文本添加和挂载目录是两种类型,新版把这两个合并到了一起,文本添加数据也是生成文件进行保存(旧版是存在yaml字段里)。

这里有一点数据上的不兼容,需要手动修复一下数据,在ims_compose 表中,yaml 字段有值得数据,setting 的json 字段增加 uri:[“目录名/dpanel-deploy.yaml”] 即可。

类似于这样的 {\"status\":\"running(1)\",\"type\":\"text\",uri:["xxx/文件名.yaml"]}