build 0.1.1

This commit is contained in:
a624669980 2021-09-27 15:40:31 +08:00
parent bf86654579
commit 191aaff575
6 changed files with 116 additions and 81 deletions

View file

@ -10,7 +10,8 @@ DateStrFormat = 20060102
DateTimeFormat = 2006-01-02 15:04:05
TimeFormat = 15:04:05
DateFormat = 2006-01-02
ProjectPath = /casaOS/server
;ProjectPath = /casaOS/server
ProjectPath = /oasis/server
[server]

View file

@ -867,9 +867,13 @@ func UpdateSetting(c *gin.Context) {
}
if !reflect.DeepEqual(m.Ports, appInfo.Ports) || !reflect.DeepEqual(m.Envs, appInfo.Envs) || !reflect.DeepEqual(m.Volumes, appInfo.Volumes) || m.PortMap != appInfo.PortMap {
//如果容器端口均未修改,这不进行处理
portsStr, _ := json2.Marshal(m.Ports)
service.MyService.Docker().DockerContainerRemove(id)
envsStr, _ := json2.Marshal(m.Envs)
volumesStr, _ := json2.Marshal(m.Volumes)
devicesStr, _ := json2.Marshal(m.Devices)
if !reflect.DeepEqual(string(portsStr), appInfo.Ports) || !reflect.DeepEqual(string(envsStr), appInfo.Envs) || !reflect.DeepEqual(string(volumesStr), appInfo.Volumes) || m.PortMap != appInfo.PortMap {
var err error
@ -879,8 +883,9 @@ func UpdateSetting(c *gin.Context) {
c.JSON(http.StatusOK, model.Result{Success: oasis_err2.ERROR, Message: oasis_err2.GetMsg(oasis_err2.ERROR)})
return
}
service.MyService.Docker().DockerContainerRemove(id)
} else if !reflect.DeepEqual(m.Devices, appInfo.Devices) || m.CpuShares != appInfo.CpuShares || m.Memory != appInfo.Memory || m.Restart != appInfo.Restart {
} else if !reflect.DeepEqual(string(devicesStr), appInfo.Devices) || m.CpuShares != appInfo.CpuShares || m.Memory != appInfo.Memory || m.Restart != appInfo.Restart {
service.MyService.Docker().DockerContainerUpdate(cpd, id)
}
@ -954,14 +959,10 @@ func UpdateSetting(c *gin.Context) {
//}
}
//如果容器端口均未修改,这不进行处理
portsStr, _ := json2.Marshal(m.Ports)
envsStr, _ := json2.Marshal(m.Envs)
volumesStr, _ := json2.Marshal(m.Volumes)
devicesStr, _ := json2.Marshal(m.Devices)
appInfo.ContainerId = containerId
appInfo.PortMap = m.PortMap
appInfo.Label = m.Label
appInfo.Index = m.Index
appInfo.Ports = string(portsStr)
appInfo.Envs = string(envsStr)
appInfo.Icon = m.Icon

View file

@ -410,7 +410,7 @@ func (ds *dockerService) DockerContainerCreate(imageName string, containerDbId s
}
}
err := file.IsNotExistMkDir(path)
err = file.IsNotExistMkDir(path)
if err != nil {
ds.log.Error("mkdir error", err)
continue

View file

@ -6,11 +6,11 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="apple-touch-icon" sizes="180x180" href="/ui//img/icon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/ui//img/icon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/ui//img/icon/favicon-16x16.png">
<link rel="manifest" href="/ui//site.webmanifest">
<link rel="mask-icon" href="/ui//img/icon/safari-pinned-tab.svg" color="#5bbad5">
<link rel="apple-touch-icon" sizes="180x180" href="/ui/img/icon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/ui/img/icon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/ui/img/icon/favicon-16x16.png">
<link rel="manifest" href="/ui/site.webmanifest">
<link rel="mask-icon" href="/ui/img/icon/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<link rel="icon" href="/ui/favicon.ico">

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long