fix: remove superfluous port config, fix chown by using env vars instead of symlinks

This commit is contained in:
petruknw
2026-05-20 21:01:33 +10:00
parent 5afc1f2b33
commit f2d9a6f7f0
2 changed files with 21 additions and 13 deletions

View File

@@ -29,14 +29,16 @@ map:
- share:rw
- media:rw
env_vars:
- name: DOWNLOAD_FOLDER
description: "Path for music downloads"
required: false
options:
download_folder: /share/aurral/downloads
data_folder: /share/aurral/data
schema:
download_folder: str
data_folder: str
port: int?
panel_icon: mdi:music-box-multiple
panel_title: Aurral

View File

@@ -4,20 +4,26 @@
# ==============================================================
DOWNLOAD_FOLDER=$(bashio::config 'download_folder')
DATA_FOLDER=$(bashio::config 'data_folder')
# Ensure host-side directories exist
mkdir -p "${DOWNLOAD_FOLDER}" "${DATA_FOLDER}"
# Ensure host-side download directory exists
mkdir -p "${DOWNLOAD_FOLDER}"
# Symlink HA share paths into the locations Aurral expects internally
rm -rf /app/downloads
ln -sf "${DOWNLOAD_FOLDER}" /app/downloads
# Aurral writes its database/config to /app/backend/data inside the container.
# We bind that to HA's addon_config directory (/config) which is always writable.
# The upstream entrypoint chowns /app/backend/data — this must be a real directory,
# not a symlink to a protected HA path, so we do NOT symlink it.
mkdir -p /config/data
rm -rf /app/backend/data
ln -sf "${DATA_FOLDER}" /app/backend/data
# If /app/backend/data exists as a real dir (from image), replace with our persistent dir
if [ ! -L /app/backend/data ]; then
rm -rf /app/backend/data
ln -sf /config/data /app/backend/data
fi
bashio::log.info "Starting Aurral"
bashio::log.info " Downloads : ${DOWNLOAD_FOLDER}"
bashio::log.info " Data : ${DATA_FOLDER}"
bashio::log.info " Data : /config/data"
exec node /app/backend/server.js
export DOWNLOAD_FOLDER="${DOWNLOAD_FOLDER}"
exec /usr/local/bin/docker-entrypoint.sh node /app/server.js