mirror of
https://github.com/aaPanel/aaPanel.git
synced 2026-10-01 13:54:51 +02:00
Update to v8.3.0
This commit is contained in:
@@ -491,10 +491,18 @@ class main(dockerBase):
|
||||
project_name,
|
||||
template_info['path']
|
||||
)
|
||||
|
||||
# 检查容器是否成功执行
|
||||
check_shell = "/usr/bin/docker-compose -p {} ps -q".format(project_name)
|
||||
container_ids, _ = public.ExecShell(check_shell)
|
||||
if not container_ids.strip():
|
||||
raise Exception("Docker deployment failed. Please check logs at: {}".format(self._log_path))
|
||||
|
||||
dp.write_log("Project [{}] deployed successfully!".format(public.xsssec(get.project_name)))
|
||||
public.set_module_logs('docker', 'add_project', 1)
|
||||
return public.return_message(0, 0, public.lang("Successful deployment!"))
|
||||
except Exception as ex:
|
||||
dp.sql("stacks").where("name=?", (public.xsssec(get.project_name),)).delete()
|
||||
public.print_log(traceback.format_exc())
|
||||
return public.return_message(-1, 0, str(ex))
|
||||
|
||||
@@ -1037,6 +1045,9 @@ class main(dockerBase):
|
||||
"remark": "Add locally"
|
||||
})
|
||||
|
||||
# 去重
|
||||
res = list({item['conf_file']: item for item in res}.values())
|
||||
|
||||
return public.return_message(0, 0, res)
|
||||
|
||||
# 从现有目录中添加模板
|
||||
|
||||
Reference in New Issue
Block a user