Refactor to use LuaJIT and improve performance

Integrate LuaJIT as an optional runtime for better performance, with a fallback to standard Lua 5.4. Update Dockerfile to install LuaJIT and create a wrapper script for execution. Enhance network module with socket fallback support and update README to reflect these changes and configuration options.
This commit is contained in:
Bastian (BaM)
2025-09-15 08:44:19 +02:00
parent fff635c2d7
commit 8cb6d55782
9 changed files with 219 additions and 48 deletions

View File

@@ -25,7 +25,7 @@ config.SSH_IDENTITY_FILE = getenv("SSH_IDENTITY_FILE", "/root/.ssh/id_rsa")
config.ERROR_PATTERN = getenv(
"ERROR_PATTERN",
("[ERROR] Document analysis failed: connect EHOSTUNREACH %s:%d"):format(
config.OLLAMA_HOST,
config.OLLAMA_HOST,
config.OLLAMA_PORT
)
)
@@ -39,4 +39,10 @@ config.WOL_PORT = tonumber(getenv("WOL_PORT", "9"))
-- Optional: wait for service to come up (kept commented to stay minimal)
-- config.UP_WAIT_TIMEOUT = tonumber(getenv("UP_WAIT_TIMEOUT", "90"))
-- Debug configuration
function config.is_debug()
local debug_env = os.getenv("DEBUG")
return debug_env and (string.lower(debug_env) == "true" or debug_env == "1")
end
return config