fix(audiobookshelf): mount the app at the base path its SPA was built for
ROUTER_BASE_PATH=/ served a healthy API and a web UI that could never boot. The index.html in the pinned image is built with routerBasePath:/audiobookshelf, so every script request fell through to the SPA fallback and came back as text/html, which Chrome refuses to execute. healthcheck, the API and the phone app all stayed fine, which is exactly how this hid behind an API-only deploy check. The deployer now reads the mounted base path out of the unit and hands it to the bootstrapper as ABS_URL, so the API door, the login route and the OIDC redirect subfolder cannot drift from the unit. healthcheck answers at the root under either base path, so the health gate is unchanged.
This commit is contained in:
1 parent
f3a6b4f715
commit
cfdd3435bc
3 files changed
+25
-5
No files matched your search
@@ -33,9 +33,16 @@ Network=pasta
|
||||
# README is the npm package's naming and is INERT here: with ABS_PORT=8000 the
|
||||
# server listened on :80 under base path /audiobookshelf, so the unit sat
|
||||
# `active (running)` while every probe to :8000 was refused (measured 2026-11-02,
|
||||
# first deploy). ROUTER_BASE_PATH=/ is what makes the URL the plain host:port.
|
||||
# first deploy).
|
||||
# ROUTER_BASE_PATH MUST be /audiobookshelf: the SPA in /app/client/dist/index.html is
|
||||
# built with `routerBasePath:"/audiobookshelf"` baked in, so it asks for its assets under
|
||||
# that prefix no matter what the server is mounted at. With `/` the server answers the
|
||||
# page but every script request falls through to the SPA fallback and comes back as
|
||||
# text/html — Chrome refuses to execute it and the UI never leaves "Loading…"
|
||||
# (measured 2026-11-03; the API and /healthcheck were fine, which is why an API-only
|
||||
# verification missed it).
|
||||
Environment=PORT=8000
|
||||
Environment=ROUTER_BASE_PATH=/
|
||||
Environment=ROUTER_BASE_PATH=/audiobookshelf
|
||||
Environment=CONFIG_PATH=/config
|
||||
Environment=METADATA_PATH=/metadata
|
||||
Environment=TZ=America/Vancouver
|
||||
@@ -45,6 +52,8 @@ Volume=/home/dank/Containers/audiobookshelf/metadata:/metadata
|
||||
Volume=/mnt/entropy/Audiobooks:/audiobooks:ro
|
||||
# The image is Alpine: it ships wget and no curl, so the health check must name
|
||||
# the binary that exists or the container is unhealthy while serving perfectly.
|
||||
# /healthcheck answers `OK` at the root AND under the base path (measured on both
|
||||
# base paths), so the probe below is correct whatever ROUTER_BASE_PATH says.
|
||||
HealthCmd=wget -q -O /dev/null http://127.0.0.1:8000/healthcheck
|
||||
HealthInterval=30s
|
||||
HealthTimeout=10s
|
||||
|
||||
Reference in new issue
Block a user