diff --git a/aurral/Dockerfile b/aurral/Dockerfile index 75ac4b458e..2d069993ff 100644 --- a/aurral/Dockerfile +++ b/aurral/Dockerfile @@ -22,10 +22,7 @@ ENV AURRAL_DATA_DIR=/config/data \ COPY rootfs / -RUN chmod a+x /etc/services.d/aurral/run \ - && mkdir -p /config/data +RUN chmod a+x /usr/local/bin/docker-entrypoint.sh -# The upstream image sets ENTRYPOINT ["docker-entrypoint.sh"]. -# Override it so s6-overlay (/init) owns startup instead. -ENTRYPOINT ["/init"] -CMD [] +ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] +CMD ["node", "server.js"] diff --git a/aurral/rootfs/usr/local/bin/docker-entrypoint.sh b/aurral/rootfs/usr/local/bin/docker-entrypoint.sh index 987a2e322c..c1cad20155 100644 --- a/aurral/rootfs/usr/local/bin/docker-entrypoint.sh +++ b/aurral/rootfs/usr/local/bin/docker-entrypoint.sh @@ -1,6 +1,14 @@ #!/bin/sh -# Passthrough entrypoint — s6-overlay (via HA init: false) handles init. -# The upstream entrypoint tries to chown /app/backend/data which fails -# on HA-mounted host paths. We bypass it entirely and use AURRAL_DATA_DIR -# to redirect the data directory instead. +set -e + +# Create persistent data directories +mkdir -p "${AURRAL_DATA_DIR:-/config/data}" +mkdir -p "${AURRAL_DATA_DIR:-/config/data}/image-proxy" +mkdir -p "${DOWNLOAD_FOLDER:-/share/aurral/downloads}" +mkdir -p "${WEEKLY_FLOW_FOLDER:-/share/aurral/downloads/weekly-flow}" + +# Pre-create /app/backend/data as a real dir so node can write to it +# (symlink approach fails when the target isn't mounted yet) +mkdir -p /app/backend/data + exec "$@"