fix: auto-build UI containers for Bitcoin, LND, Electrumx
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:
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM 80.71.235.15:3000/archipelago/nginx:1.29.6-alpine
|
||||
FROM 80.71.235.15:3000/archipelago/nginx:1.27.4-alpine
|
||||
COPY index.html /usr/share/nginx/html/
|
||||
COPY 50x.html /usr/share/nginx/html/
|
||||
COPY assets/ /usr/share/nginx/html/assets/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM 80.71.235.15:3000/archipelago/nginx:1.29.6-alpine
|
||||
FROM 80.71.235.15:3000/archipelago/nginx:1.27.4-alpine
|
||||
COPY index.html /usr/share/nginx/html/
|
||||
COPY 50x.html /usr/share/nginx/html/
|
||||
COPY assets/ /usr/share/nginx/html/assets/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM 80.71.235.15:3000/archipelago/nginx:1.29.6-alpine
|
||||
FROM 80.71.235.15:3000/archipelago/nginx:1.27.4-alpine
|
||||
|
||||
# Copy the HTML file
|
||||
COPY index.html /usr/share/nginx/html/
|
||||
|
||||
@@ -1370,9 +1370,9 @@ if [ -f "$SCRIPT_DIR/../scripts/image-versions.sh" ]; then
|
||||
echo " ✅ Bundled image-versions.sh"
|
||||
fi
|
||||
|
||||
# Bundle docker UI source files for building custom UIs on first boot (fallback if images not captured)
|
||||
# Skip for unbundled builds
|
||||
if [ "$UNBUNDLED" != "1" ]; then
|
||||
# Bundle docker UI source files for building custom UIs on first boot
|
||||
# Always bundle — these are tiny HTML/CSS files, not container images
|
||||
if true; then
|
||||
DOCKER_UI_DIR="$SCRIPT_DIR/../docker"
|
||||
if [ -d "$DOCKER_UI_DIR" ]; then
|
||||
echo " Bundling docker UI source files..."
|
||||
|
||||
Reference in New Issue
Block a user