mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-10-12 03:01:35 +02:00
fix(filebrowser_quantum): write the v2 config format so 2.0.0 starts
v2 rejects the string server.database, the 1.x server.port/listen/baseURL keys and the FILEBROWSER_DATABASE variable, so both fresh installs and upgrades died at startup. Write http.* and server.database.path, and point migrateFrom at an existing 1.x BoltDB so upstream migrates it on first start. Fixes #3109 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
|
||||
## 2.0.0.1 (2026-10-11)
|
||||
- Fix startup on 2.0.0 (fresh installs and upgrades): write the v2 config format (`http.port`/`listen`/`baseURL`, `server.database.path`), drop the deprecated `FILEBROWSER_DATABASE` variable, and migrate an existing 1.x `/config/database.db` to `/config/database.sqlite` on first start (#3109)
|
||||
|
||||
## 2.0.0 (2026-10-10)
|
||||
- Update to latest version from gtsteffaniak/filebrowser (changelog : https://github.com/gtsteffaniak/filebrowser/releases)
|
||||
- Local disks: `localdisks` can now mount a single folder of a disk with `disk/folder` (e.g. `sda1/public` or `NAS/public`, mounted at `/mnt/<disk>/<folder>`). Existing values are unchanged.
|
||||
|
||||
@@ -74,7 +74,6 @@ devices:
|
||||
environment:
|
||||
FB_BASEURL: /filebrowser_quantum
|
||||
FILEBROWSER_CONFIG: "/config/config.yaml"
|
||||
FILEBROWSER_DATABASE: "/config/database.db"
|
||||
PGID: "0"
|
||||
PUID: "0"
|
||||
image: ghcr.io/alexbelgium/filebrowser_quantum-{arch}
|
||||
@@ -118,4 +117,4 @@ schema:
|
||||
slug: filebrowser_quantum
|
||||
udev: true
|
||||
url: https://github.com/alexbelgium/hassio-addons
|
||||
version: "2.0.0"
|
||||
version: "2.0.0.1"
|
||||
|
||||
@@ -88,9 +88,15 @@ bashio::log.info "Updating FileBrowser config..."
|
||||
|
||||
# --- Server (hardcoded values) ---
|
||||
bashio::log.info "... set server"
|
||||
yq e -i ".server.port = 8080" "$FILEBROWSER_CONFIG"
|
||||
yq e -i ".server.listen = \"0.0.0.0\"" "$FILEBROWSER_CONFIG"
|
||||
yq e -i ".server.database = \"/config/database.db\"" "$FILEBROWSER_CONFIG"
|
||||
# v2 moved port/listen/baseURL under http: and rejects the 1.x keys
|
||||
yq e -i "del(.server.port, .server.listen, .server.baseURL)" "$FILEBROWSER_CONFIG"
|
||||
yq e -i ".http.port = 8080" "$FILEBROWSER_CONFIG"
|
||||
yq e -i ".http.listen = \"0.0.0.0\"" "$FILEBROWSER_CONFIG"
|
||||
yq e -i ".server.database = {\"path\": \"/config/database.sqlite\"}" "$FILEBROWSER_CONFIG"
|
||||
# Import the 1.x BoltDB; upstream skips it once the SQLite file is populated
|
||||
if [ -s /config/database.db ]; then
|
||||
yq e -i ".server.database.migrateFrom = \"/config/database.db\"" "$FILEBROWSER_CONFIG"
|
||||
fi
|
||||
yq e -i ".server.cacheDir = \"/cache\"" "$FILEBROWSER_CONFIG"
|
||||
|
||||
# --- Default user scope / source path ---
|
||||
@@ -117,7 +123,7 @@ yq e -i ".server.sources[0].config.defaultUserScope = \"${DEFAULT_USER_SCOPE}\""
|
||||
# --- Base URL (from env or config) ---
|
||||
bashio::log.info "... set base URL to allow ingress"
|
||||
BASE_URL=$(bashio::config 'base_url' "${FB_BASEURL:-/}")
|
||||
yq e -i ".server.baseURL = \"${BASE_URL}\"" "$FILEBROWSER_CONFIG"
|
||||
yq e -i ".http.baseURL = \"${BASE_URL}\"" "$FILEBROWSER_CONFIG"
|
||||
|
||||
# --- Auth method ---
|
||||
AUTH_METHOD=$(bashio::config 'auth_method' 'password')
|
||||
|
||||
Reference in New Issue
Block a user