diff --git a/src/commentbot/CommentBot.jl b/src/commentbot/CommentBot.jl index ae75a7838e..1d0d20708d 100644 --- a/src/commentbot/CommentBot.jl +++ b/src/commentbot/CommentBot.jl @@ -129,6 +129,14 @@ function action(rp::RequestParams{T}, zsock::RequestSocket) where T <: RegisterT target_registry_name, target_registry = filteredtargets[1] end end + + # Here we will check if the target registry has a repo argument, and if not, + # assign it a default one, obtained from ENV. + if !haskey(target_registry, "repo") + specific_env_key = string(uppercase(target_registry_name), "_REGISTRY_URL") + envkey = ifelse(haskey(ENV, specific_env_key), specific_env_key, "DEFAULT_REGISTRY_URL") + target_registry["repo"] = ENV[envkey] + end pp = ProcessedParams(rp) @info("Processing register event", reponame=rp.reponame, target_registry_name) diff --git a/src/webui/WebUI.jl b/src/webui/WebUI.jl index 633924156f..bf54906fc5 100644 --- a/src/webui/WebUI.jl +++ b/src/webui/WebUI.jl @@ -205,7 +205,8 @@ function main(config::AbstractString=isempty(ARGS) ? "config.toml" : first(ARGS) init_registry() ip = CONFIG["ip"] == "localhost" ? Sockets.localhost : parse(IPAddr, CONFIG["ip"]) - port = CONFIG["port"] + #port = CONFIG["port"] + port=get(CONFIG, "port", parse(Int, get(ENV, "PORT", "8001"))) @info "Starting WebUI" ip port monitor = @async status_monitor(CONFIG["stop_file"], event_queue, httpsock)