From 55236b67c3b7e0fb6f47960f6a358c9eefdd9160 Mon Sep 17 00:00:00 2001 From: petruknw Date: Thu, 21 May 2026 16:24:51 +1000 Subject: [PATCH] aurral: replace /app/backend/data and /app/downloads with symlinks at build time --- aurral/Dockerfile | 5 +++++ aurral/rootfs/usr/local/bin/docker-entrypoint.sh | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/aurral/Dockerfile b/aurral/Dockerfile index d75a0fc8e7..7da8b9d2ff 100644 --- a/aurral/Dockerfile +++ b/aurral/Dockerfile @@ -19,6 +19,11 @@ LABEL \ ENV DOWNLOAD_FOLDER=/share/aurral/downloads \ WEEKLY_FLOW_FOLDER=/share/aurral/downloads/weekly-flow +# Replace the upstream data/downloads dirs with symlinks into HA persistent storage. +# Must be done at build time — the dirs are owned by a non-root user at runtime. +RUN rm -rf /app/backend/data && ln -s /config/data /app/backend/data \ + && rm -rf /app/downloads && ln -s /share/aurral/downloads /app/downloads + COPY rootfs / RUN chmod a+x /usr/local/bin/docker-entrypoint.sh diff --git a/aurral/rootfs/usr/local/bin/docker-entrypoint.sh b/aurral/rootfs/usr/local/bin/docker-entrypoint.sh index 27d30659f3..7ff15f9947 100644 --- a/aurral/rootfs/usr/local/bin/docker-entrypoint.sh +++ b/aurral/rootfs/usr/local/bin/docker-entrypoint.sh @@ -1,14 +1,9 @@ #!/bin/sh set -e -# Create persistent directories in HA volumes +# Create the real directories in HA persistent storage that the symlinks point to mkdir -p /config/data mkdir -p "${DOWNLOAD_FOLDER:-/share/aurral/downloads}" mkdir -p "${WEEKLY_FLOW_FOLDER:-/share/aurral/downloads/weekly-flow}" -# The upstream app expects its data at /app/backend/data and downloads at /app/downloads. -# Symlink both into HA persistent storage. -ln -sfn /config/data /app/backend/data -ln -sfn "${DOWNLOAD_FOLDER:-/share/aurral/downloads}" /app/downloads - exec "$@"