diff --git a/ct/bindery.sh b/ct/bindery.sh new file mode 100644 index 0000000000..f23618491c --- /dev/null +++ b/ct/bindery.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/DevScripts/main" +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") +# Copyright (c) 2021-2026 community-scripts ORG +# Author: vavallee (vavallee) +# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE +# Source: https://github.com/vavallee/bindery + +APP="Bindery" +var_tags="${var_tags:-arr;ebook;audiobook}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-1024}" +var_disk="${var_disk:-4}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /opt/bindery ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "bindery" "vavallee/bindery"; then + msg_info "Stopping Bindery" + systemctl stop bindery + msg_ok "Stopped Bindery" + + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bindery" "vavallee/bindery" "prebuild" "latest" "/opt/bindery" "bindery_*_linux_$(arch_resolve "amd64" "arm64").tar.gz" + + msg_info "Starting Bindery" + systemctl start bindery + msg_ok "Started Bindery" + msg_ok "Updated successfully!" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW}Access it using the following URL:${CL}" +echo -e "${GATEWAY}${BGN}http://${IP}:8787${CL}" diff --git a/install/bindery-install.sh b/install/bindery-install.sh new file mode 100644 index 0000000000..6d58ee1aab --- /dev/null +++ b/install/bindery-install.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: vavallee (vavallee) +# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE +# Source: https://github.com/vavallee/bindery + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +fetch_and_deploy_gh_release "bindery" "vavallee/bindery" "prebuild" "latest" "/opt/bindery" "bindery_*_linux_$(arch_resolve "amd64" "arm64").tar.gz" + +msg_info "Configuring Bindery" +mkdir -p /opt/bindery_data /books /downloads +cat </opt/bindery_data/.env +BINDERY_PORT=8787 +BINDERY_DB_PATH=/opt/bindery_data/bindery.db +BINDERY_DATA_DIR=/opt/bindery_data +BINDERY_LIBRARY_DIR=/books +BINDERY_DOWNLOAD_DIR=/downloads +EOF2 +msg_ok "Configured Bindery" + +msg_info "Creating Service" +cat </etc/systemd/system/bindery.service +[Unit] +Description=Bindery +After=network.target + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/bindery +EnvironmentFile=/opt/bindery_data/.env +ExecStart=/opt/bindery/bindery +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF2 +systemctl enable -q --now bindery +msg_ok "Created Service" + +motd_ssh +customize +cleanup_lxc diff --git a/json/bindery.json b/json/bindery.json new file mode 100644 index 0000000000..793418732e --- /dev/null +++ b/json/bindery.json @@ -0,0 +1,45 @@ +{ + "name": "Bindery", + "slug": "bindery", + "categories": [ + 14 + ], + "date_created": "2026-11-09", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8787, + "documentation": "https://github.com/vavallee/bindery/blob/main/docs/DEPLOYMENT.md", + "website": "https://github.com/vavallee/bindery", + "repository": "https://github.com/vavallee/bindery", + "logo": "https://cdn.jsdelivr.net/gh/vavallee/bindery@main/.github/assets/logo.png", + "description": "Bindery is a self-hosted book and audiobook manager in the *arr style. It tracks authors and series, searches Usenet and torrent indexers, hands grabs to your download client and imports finished files into your library, with OPDS, multi-user support and OIDC sign-in.", + "install_methods": [ + { + "type": "default", + "script": "ct/bindery.sh", + "config_path": "/opt/bindery_data/.env", + "resources": { + "cpu": 2, + "ram": 1024, + "hdd": 4, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Open the web UI once to create the admin account on the first-run setup page.", + "type": "info" + }, + { + "text": "Books land in /books and downloads in /downloads. Mount your own storage on those paths or change them in /opt/bindery_data/.env.", + "type": "info" + } + ] +}