aurral: replace /app/backend/data and /app/downloads with symlinks at build time

This commit is contained in:
petruknw
2026-05-21 16:24:51 +10:00
parent 78da35d63f
commit 55236b67c3
2 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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 "$@"