mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-08-16 10:02:30 +02:00
aurral: replace /app/backend/data and /app/downloads with symlinks at build time
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 "$@"
|
||||
|
||||
Reference in New Issue
Block a user