From c44e17967f972897c2c7a16ec9d87f85fec8156b Mon Sep 17 00:00:00 2001 From: librelad Date: Fri, 3 Jul 2026 21:43:59 +0100 Subject: [PATCH] fix(marketplace): converge the nginx.conf bind-mount source in the install hook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The generic installer copies only config+compose into the live dir, so the compose's nginx.conf file mount had no source — and a premature container start leaves a directory placeholder at the mount path. The post_setup hook now removes the placeholder and copies the file from the definition, so (re)install converges. Co-Authored-By: Claude Fable 5 Signed-off-by: librelad --- .../scripts/marketplace_install_hooks.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/containers/marketplace/scripts/marketplace_install_hooks.sh b/containers/marketplace/scripts/marketplace_install_hooks.sh index 549185c..ba8bdd1 100644 --- a/containers/marketplace/scripts/marketplace_install_hooks.sh +++ b/containers/marketplace/scripts/marketplace_install_hooks.sh @@ -8,11 +8,18 @@ marketplace_install_post_setup() { local app_name="$1" - local src="${install_containers_dir%/}/$app_name/resources/site" - local dest="$containers_dir$app_name/data" + local def="${install_containers_dir%/}/$app_name" + local live="$containers_dir$app_name" + local dest="$live/data" + + # The compose bind-mounts nginx.conf as a FILE; the generic installer + # copies only config+compose, and a premature container start leaves a + # directory placeholder at the mount path — converge both cases. + [[ -d "$live/nginx.conf" ]] && runFileOp rm -rf "$live/nginx.conf" + runFileOp cp -f "$def/nginx.conf" "$live/nginx.conf" || return 1 runFileOp mkdir -p "$dest" || return 1 - runFileOp cp -f "$src/index.html" "$dest/index.html" || return 1 - runFileOp cp -f "${install_containers_dir%/}/$app_name/$app_name.svg" "$dest/marketplace.svg" || return 1 + runFileOp cp -f "$def/resources/site/index.html" "$dest/index.html" || return 1 + runFileOp cp -f "$def/$app_name.svg" "$dest/marketplace.svg" || return 1 isSuccessful "Marketplace site seeded. Publish a catalog into it: rsync dist// $dest//" }