fix: auto-build UI containers for Bitcoin, LND, Electrumx
Some checks failed
Build Archipelago ISO (dev) / build-iso (push) Failing after 23m8s
Container Orchestration Tests / unit-tests (push) Failing after 6m27s
Container Orchestration Tests / smoke-tests (push) Has been skipped

Critical: headless services (Bitcoin, LND, Electrumx) need companion
UI containers that serve web dashboards. These were only built for
Bitcoin, and only on bundled ISO builds.

Changes:
- install.rs: auto-build UI containers for LND (port 8081) and
  Electrumx (port 50002) in addition to Bitcoin (port 8334)
- build-auto-installer-iso.sh: always bundle docker UI source files
  (was skipping for unbundled builds — they're tiny HTML, not images)
- Dockerfiles: fix nginx base image tag 1.29.6→1.27.4 (matches registry)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-29 17:48:13 +01:00
parent 0b5fb4c90b
commit 08ddc73c75
5 changed files with 41 additions and 18 deletions

View File

@@ -615,31 +615,54 @@ printtoconsole=1\n",
});
}
if matches!(package_id, "bitcoin" | "bitcoin-core" | "bitcoin-knots") {
// Build and start companion UI containers for headless services
let ui_builds: Vec<(&str, &str, &str, &str)> = match package_id {
"bitcoin" | "bitcoin-core" | "bitcoin-knots" => {
vec![("bitcoin-ui", "/opt/archipelago/docker/bitcoin-ui", "localhost/bitcoin-ui", "8334:80")]
}
"lnd" => {
vec![("archy-lnd-ui", "/opt/archipelago/docker/lnd-ui", "localhost/lnd-ui", "8081:80")]
}
"electrumx" | "electrs" | "mempool-electrs" => {
vec![("archy-electrs-ui", "/opt/archipelago/docker/electrs-ui", "localhost/electrs-ui", "50002:80")]
}
_ => vec![],
};
for (name, ui_dir, image, port) in ui_builds {
let name = name.to_string();
let ui_dir = ui_dir.to_string();
let image = image.to_string();
let port = port.to_string();
tokio::spawn(async move {
let ui_dir = "/opt/archipelago/docker/bitcoin-ui";
if !std::path::Path::new(&ui_dir).exists() {
info!("UI source not found at {}, skipping", ui_dir);
return;
}
info!("Building UI container {} from {}", name, ui_dir);
let _ = tokio::process::Command::new("podman")
.args(["build", "-t", "localhost/bitcoin-ui", ui_dir])
.args(["build", "-t", &image, &ui_dir])
.output()
.await;
let _ = tokio::process::Command::new("podman")
.args(["rm", "-f", "bitcoin-ui"])
.args(["rm", "-f", &name])
.output()
.await;
let _ = tokio::process::Command::new("podman")
.args([
"run",
"-d",
"--name",
"bitcoin-ui",
"run", "-d",
"--name", &name,
"--restart=unless-stopped",
"-p",
"8334:80",
"localhost/bitcoin-ui:latest",
"--network=archy-net",
"--cap-drop=ALL",
"--cap-add=NET_BIND_SERVICE",
"--memory=64m",
"-p", &port,
&format!("{}:latest", image),
])
.output()
.await;
info!("Bitcoin UI container started on port 8334");
info!("{} UI container started on port {}", name, port);
});
}
}