Skip to content

Commit dc000fc

Browse files
committed
v1.9.1.2 fix #243
1 parent 1b5f63f commit dc000fc

30 files changed

+172
-132
lines changed

.github/workflows/release.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,4 +279,39 @@ jobs:
279279
with:
280280
tag_name: ${{ github.ref_name }}
281281
files: runtime/*
282-
prerelease: false
282+
prerelease: false
283+
push-tags-to-related-repos:
284+
needs: [ build ]
285+
runs-on: ubuntu-latest
286+
steps:
287+
- name: Checkout dpanel-gui
288+
uses: actions/checkout@v4
289+
with:
290+
repository: donknap/dpanel-gui
291+
token: ${{ secrets.MY_GITHUB_TOKEN }}
292+
path: dpanel-gui
293+
294+
- name: Push tag to dpanel-gui
295+
working-directory: ./dpanel-gui
296+
run: |
297+
TAG=${{ github.ref_name }}
298+
git config user.name "donknap"
299+
git config user.email "donknap@gmail.com"
300+
git tag -f "$TAG"
301+
git push origin "$TAG" --force
302+
303+
- name: Checkout dpanel-fnnas
304+
uses: actions/checkout@v4
305+
with:
306+
repository: donknap/dpanel-fnnas
307+
token: ${{ secrets.MY_GITHUB_TOKEN }}
308+
path: dpanel-fnnas
309+
310+
- name: Push tag to dpanel-fnnas
311+
working-directory: ./dpanel-fnnas
312+
run: |
313+
TAG=${{ github.ref_name }}
314+
git config user.name "donknap"
315+
git config user.email "donknap@gmail.com"
316+
git tag -f "$TAG"
317+
git push origin "$TAG" --force

app/application/logic/compose.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,11 @@ func (self Compose) Sync(dockerEnvName string) error {
287287
composeList, _ := dao.Compose.Find()
288288
for _, dbComposeRow := range composeList {
289289
if find, ok := findComposeList[dbComposeRow.Name]; ok && find.Setting.DockerEnvName == dbComposeRow.Setting.DockerEnvName {
290+
// 如果 uri 中的文件名不在数据库中,则更新
291+
if !function.InArrayArray(dbComposeRow.Setting.Uri, find.Setting.Uri...) {
292+
dbComposeRow.Setting.Uri = find.Setting.Uri
293+
_ = dao.Compose.Save(dbComposeRow)
294+
}
290295
delete(findComposeList, dbComposeRow.Name)
291296
} else {
292297
// 除非任务的类型是属于当前的环境才执行删除
@@ -321,9 +326,11 @@ func (self Compose) ComposeProjectOptionsFn(dbRow *entity.Compose) []cli.Project
321326
}
322327
// 如果开启了独立目录,获取挂载目录也应该只取对应的的
323328
mountComposePath := "/dpanel/compose"
324-
if dbRow.Setting.DockerEnvName != docker.DefaultClientName {
329+
330+
if docker.S().DockerEnv.EnableComposePath {
325331
mountComposePath = filepath.Join("/", "dpanel", "compose-"+dbRow.Setting.DockerEnvName)
326332
}
333+
327334
for _, mount := range dpanelContainerInfo.Mounts {
328335
if mount.Type == types.VolumeTypeBind && mount.Destination == mountComposePath && !strings.HasSuffix(filepath.VolumeName(mount.Source), ":") {
329336
linkComposePath = mount.Source

app/common/http/controller/env.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ func (self Env) GetDetail(http *gin.Context) {
338338
}
339339
}
340340
}
341-
if dockerEnv.EnableSSH && dockerEnv.ServerUrl == "" {
341+
if dockerEnv.EnableSSH && dockerEnv.Name != docker.DefaultClientName && dockerEnv.ServerUrl == "" {
342342
dockerEnv.ServerUrl = dockerEnv.SshServerInfo.Address
343343
}
344344
if dockerEnv.ServerUrl == "" {

app/common/http/controller/home.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ func (self Home) Usage(http *gin.Context) {
544544
recycleQuery = recycleQuery.Where(dao.Site.SiteName.NotIn(names...))
545545
}
546546
containerTask, _ := recycleQuery.Count()
547-
imageTask, _ := dao.Image.Count()
547+
imageTask, _ := dao.Image.Where(dao.Image.Setting.IsNotNull()).Count()
548548
backupData, _ := dao.Backup.Count()
549549

550550
self.JsonResponseWithoutError(http, gin.H{

app/common/http/controller/store.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,13 +328,13 @@ func (self Store) Deploy(http *gin.Context) {
328328
Uri: []string{
329329
filepath.Join(params.Name, filepath.Base(params.ComposeFile)),
330330
},
331-
DockerEnvName: docker.DefaultClientName,
331+
DockerEnvName: docker.Sdk.Name,
332332
},
333333
}
334+
334335
targetPath := filepath.Join(storage.Local{}.GetComposePath(""), params.Name)
335336
if docker.Sdk.DockerEnv.EnableComposePath {
336337
targetPath = filepath.Join(storage.Local{}.GetComposePath(docker.Sdk.Name), params.Name)
337-
composeNew.Setting.DockerEnvName = docker.Sdk.Name
338338
}
339339

340340
err = dao.Compose.Create(composeNew)

app/pro

Submodule pro updated from 702ed81 to 1a9e207

asset/static/110.f3d64f88.async.js

Lines changed: 0 additions & 42 deletions
This file was deleted.

asset/static/1218.6c94f144.async.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

asset/static/1218.f993323f.async.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

asset/static/2241.d1d095ae.async.js

Lines changed: 42 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)