--[[ LuCI - Lua Configuration Interface ]]-- local taskd = require "luci.model.tasks" local joplin_model = require "luci.model.joplin" local m, s, o m = taskd.docker_map("joplin", "joplin", "/usr/libexec/apps/joplin/joplin.sh", translate("Joplin"), translate("Joplin Server can run in a Docker container on your server or anywhere you want to run it with Docker. Joplin Server will allow you to sync notes from the desktop application and mobile phone applications so you can view, edit or add notes anywhere on the go.") .. translate("Official website:") .. ' https://hub.docker.com/r/florider89/joplin-server/') s = m:section(SimpleSection, translate("Service Status"), translate("joplin status:")) s:append(Template("joplin/status")) s = m:section(TypedSection, "joplin", translate("Setup"), translate("The following parameters will only take effect during installation or upgrade:")) s.addremove=false s.anonymous=true o = s:option(Value, "port", translate("Port").."*") o.rmempty = false o.default = "22300" o.datatype = "port" o = s:option(Value, "image_name", translate("Image").."*") o.rmempty = false o.datatype = "string" o:value("florider89/joplin-server:latest", "florider89/joplin-server:latest") o.default = "florider89/joplin-server:latest" local blocks = joplin_model.blocks() local home = joplin_model.home() o = s:option(Value, "config_path", translate("Config path").."*") o.rmempty = false o.datatype = "string" o:value("/opt/docker2/compose/joplin", "/opt/docker2/compose/joplin") o.default = "/opt/docker2/compose/joplin" local paths, default_path = joplin_model.find_paths(blocks, home, "Configs") for _, val in pairs(paths) do o:value(val, val) end o.default = default_path return m