--[[ LuCI - Lua Configuration Interface ]]-- local taskd = require "luci.model.tasks" local gitea_model = require "luci.model.gitea" local m, s, o m = taskd.docker_map("gitea", "gitea", "/usr/libexec/apps/gitea/gitea.sh", translate("Gitea"), translate("What is Gitea? Gitea is a painless self-hosted all-in-one software development service, it includes Git hosting, code review, team collaboration, package registry and CI/CD. It is similar to GitHub, Bitbucket and GitLab.") .. translate("Official website:") .. ' https://docs.gitea.io/') s = m:section(SimpleSection, translate("Service Status"), translate("gitea status:")) s:append(Template("gitea/status")) s = m:section(TypedSection, "gitea", translate("Setup"), translate("Refresh to update settings.")) s.addremove=false s.anonymous=true o = s:option(Value, "port", translate("Port").."*") o.rmempty = false o.default = "3000" o.datatype = "port" o = s:option(Value, "image_name", translate("Image").."*") o.rmempty = false o.datatype = "string" o:value("gitea/gitea:1.17.1", "gitea/gitea:1.17.1") o.default = "gitea/gitea:1.17.1" local blocks = gitea_model.blocks() local home = gitea_model.home() o = s:option(Value, "config_path", translate("Config path").."*") o.rmempty = false o.datatype = "string" o:value("/opt/docker2/compose/gitea", "/opt/docker2/compose/gitea") o.default = "/opt/docker2/compose/gitea" local paths, default_path = gitea_model.find_paths(blocks, home, "Configs") for _, val in pairs(paths) do o:value(val, val) end o.default = default_path return m