--[[ LuCI - Lua Configuration Interface ]]-- local taskd = require "luci.model.tasks" local wordpress_model = require "luci.model.wordpress" local m, s, o m = taskd.docker_map("wordpress", "wordpress", "/usr/libexec/apps/wordpress/wordpress.sh", translate("wordpress"), translate("WordPress is an open-source content management system (CMS) software used to build, modify, and maintain websites. In technical terms, WordPress is written in PHP and run on a MySQL or MariaDB database.") .. translate("Official website:") .. ' https://wordpress.org/') s = m:section(SimpleSection, translate("Service Status"), translate("wordpress status:")) s:append(Template("wordpress/status")) s = m:section(TypedSection, "wordpress", 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 = "88" o.datatype = "port" o = s:option(Value, "image_name", translate("Image").."*") o.rmempty = false o.datatype = "string" o:value("wordpress:latest", "wordpress:latest") o.default = "wordpress:latest" local blocks = wordpress_model.blocks() local home = wordpress_model.home() o = s:option(Value, "config_path", translate("Config path").."*") o.rmempty = false o.datatype = "string" o:value("/opt/docker2/compose/wordpress", "/opt/docker2/compose/wordpress") o.default = "/opt/docker2/compose/wordpress" local paths, default_path = wordpress_model.find_paths(blocks, home, "Configs") for _, val in pairs(paths) do o:value(val, val) end o.default = default_path return m