The upstream Maintainerr builds its Vite/React frontend with a
__PATH_PREFIX__ placeholder that gets replaced at runtime by start.sh
using the BASE_PATH env var. This sets:
- React Router's basename (createBrowserRouter)
- API base URL (axios calls)
- EventSource URLs
- Vite asset prefix
Without this replacement, React Router has an empty basename and can't
match the ingress URL (/api/hassio_ingress/<token>/), returning
"No route matches URL".
Fix: Replace __PATH_PREFIX__ in the built UI files with the HA ingress
entry before starting the app. Remove nginx sub_filters (no longer
needed since the UI files already reference the correct ingress-prefixed
URLs). Keep the nginx rewrite rule to strip the prefix on the server side.
Agent-Logs-Url: https://github.com/alexbelgium/hassio-addons/sessions/e0751563-06a4-4b4e-a4a7-63b2e5f66f03
Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
The entrypoint used `bashio "$script"` to run init scripts, but bashio CLI
is a function dispatcher (bashio::"${@}"), not a script interpreter. This
meant 32-nginx_ingress.sh never executed, leaving nginx config with
unsubstituted %%port%%/%%interface%%/%%ingress_entry%% placeholders, so
nginx failed to start and ingress returned 404.
Fix: source the bashio library first, then run each init script via
`source` in a subshell so bashio:: functions are inherited.
Agent-Logs-Url: https://github.com/alexbelgium/hassio-addons/sessions/d5bff0a8-62ba-4564-a4fc-74c87d8b0d55
Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
The upstream Maintainerr image declares /opt/data as a Docker VOLUME.
Attempting to rm -rf /opt/data fails with "Resource busy" because mount
points cannot be removed. Instead, we now:
1. Copy seed data from /opt/data to /config (persistent storage)
2. Clear contents inside /opt/data (rm -rf /opt/data/*)
3. Symlink each item in /config back into /opt/data
This ensures the VOLUME directory stays intact while all data is
redirected to persistent storage.
Agent-Logs-Url: https://github.com/alexbelgium/hassio-addons/sessions/82a46feb-2e9c-4c40-b193-614167e6d5c3
Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
- Use DATA_DIR=/config (config:rw map) per maintainer request
- Scope chmod to /entrypoint.sh and cont-init.d instead of whole FS
- Gate chown -R behind .initialized marker to avoid slow restarts