Files
templates/blueprints/calibre-web/template.toml
Yury 80657e2a90 Add metadata.db generation for calibre-web (#444)
* Add metadata.db generation for calibre-web

* Attempt to fix template
2025-10-25 17:39:12 -06:00

40 lines
976 B
TOML

[variables]
main_domain = "${domain}"
[config]
[[config.domains]]
serviceName = "calibre-web"
port = 8083
host = "${main_domain}"
[config.env]
PUID = "1000"
PGID = "1000"
TZ = "Etc/UTC"
DOCKER_MODS = "linuxserver/mods:universal-calibre"
OAUTHLIB_RELAX_TOKEN_SCOPE = "1"
[[config.mounts]]
filePath = "startup-scripts/metadata-db-generator.sh"
content = """
#!/bin/bash
FILE=/books/metadata.db
PUID=1000
PGID=1000
if test -f "$FILE"; then
echo "$FILE already exists, skipping generation."
else
echo "$FILE does not exists, downloading..."
# download empty database from the calibre-web repo
curl -L -O --output-dir /books https://github.com/janeczku/calibre-web/raw/refs/heads/master/library/metadata.db
echo "$FILE downloaded, setting permissions..."
chmod a+w $FILE
# this is needed for uploads, you can remove it if you don't want to allow uploads
chown $PUID:$PGID /books
echo "Permissions fixed, use /books as library path"
fi
"""