Booklore¶
| Description / name | Input element |
|---|---|
| Your domain name |
Overview¶
Booklore is a powerful, self-hosted web application designed to organize and manage your personal book collection with elegance and ease. Build your dream library with an intuitive interface, robust metadata management, and seamless multi-user support.
Configuration¶
The Bookdrop location is managed by the role and defaults to /mnt/unionfs/downloads/bookdrop (based on your downloads root), where other apps have access to place downloads in.
To rename the subdirectory, you can use booklore_role_bookdrop_subfolder, detailed in the Settings tab below.
Deployment¶
sb install sandbox-booklore
Usage¶
Visit https://booklore.iYOUR_DOMAIN_NAMEi.
-
On your first visit you must create an admin user account.
-
After logging back in with the admin user account, create your first library.
-
Create a directory for your book files (e.g.
/mnt/unionfs/Media/Books) or use an existing directory.Select that path when creating your library.
Role Defaults¶
Variables can be customized using the Inventory. (1)
-
Example override
booklore_name: "custom_value"Avoid overriding variables ending in
_defaultWhen overriding variables that end in
_default(likebooklore_docker_envs_default), you replace the entire default configuration. Future updates that add new default values will not be applied to your setup, potentially breaking functionality.Instead, use the corresponding
_customvariable (likebooklore_docker_envs_custom) to add your changes. Custom values are merged with defaults, ensuring you receive updates.
booklore_name
# Type: string
booklore_name: booklore
booklore_role_media_subfolder
# Name of a subdirectory to be created in /mnt/unionfs/Media/
# Opt out with a falsy value (e.g. "")
# Type: string
booklore_role_media_subfolder: "Books"
booklore_role_bookdrop_subfolder
# Name of the Bookdrop subdirectory
# Will be placed in the downloads root: usually /mnt/unionfs/downloads/
# Type: string
booklore_role_bookdrop_subfolder: "bookdrop"
booklore_role_mariadb_name
# Type: string
booklore_role_mariadb_name: "{{ booklore_name }}-mariadb"
booklore_role_mariadb_paths_folder
# Type: string
booklore_role_mariadb_paths_folder: "{{ booklore_name }}"
booklore_role_mariadb_paths_location
# Type: string
booklore_role_mariadb_paths_location: "{{ server_appdata_path }}/{{ booklore_role_mariadb_paths_folder }}/mariadb"
booklore_role_mariadb_docker_image_tag
# Type: string
booklore_role_mariadb_docker_image_tag: "11.4"
booklore_role_mariadb_docker_env_db
# Type: string
booklore_role_mariadb_docker_env_db: "{{ booklore_name }}-mariadb"
booklore_role_web_subdomain
# Type: string
booklore_role_web_subdomain: "{{ booklore_name }}"
booklore_role_web_domain
# Type: string
booklore_role_web_domain: "{{ user.domain }}"
booklore_role_web_port
# Type: string
booklore_role_web_port: "6060"
booklore_role_web_url
# Type: string
booklore_role_web_url: "{{ 'https://' + (lookup('role_var', '_web_subdomain', role='booklore') + '.' + lookup('role_var', '_web_domain', role='booklore')
if (lookup('role_var', '_web_subdomain', role='booklore') | length > 0)
else lookup('role_var', '_web_domain', role='booklore')) }}"
booklore_role_dns_record
# Type: string
booklore_role_dns_record: "{{ lookup('role_var', '_web_subdomain', role='booklore') }}"
booklore_role_dns_zone
# Type: string
booklore_role_dns_zone: "{{ lookup('role_var', '_web_domain', role='booklore') }}"
booklore_role_dns_proxy
# Type: bool (true/false)
booklore_role_dns_proxy: "{{ dns.proxied }}"
booklore_role_traefik_sso_middleware
# Type: string
booklore_role_traefik_sso_middleware: ""
booklore_role_traefik_middleware_default
# Type: string
booklore_role_traefik_middleware_default: "{{ traefik_default_middleware }},booklore-kobo-sync-headers"
booklore_role_traefik_middleware_custom
# Type: string
booklore_role_traefik_middleware_custom: ""
booklore_role_traefik_certresolver
# Type: string
booklore_role_traefik_certresolver: "{{ traefik_default_certresolver }}"
booklore_role_traefik_enabled
# Type: bool (true/false)
booklore_role_traefik_enabled: true
Container
booklore_role_docker_container
# Type: string
booklore_role_docker_container: "{{ booklore_name }}"
Image
booklore_role_docker_image_pull
# Type: bool (true/false)
booklore_role_docker_image_pull: true
booklore_role_docker_image_tag
# Type: string
booklore_role_docker_image_tag: "latest"
booklore_role_docker_image_repo
# Type: string
booklore_role_docker_image_repo: "booklore/booklore"
booklore_role_docker_image
# Type: string
booklore_role_docker_image: "{{ lookup('role_var', '_docker_image_repo', role='booklore') }}:{{ lookup('role_var', '_docker_image_tag', role='booklore') }}"
Envs
booklore_role_docker_envs_default
# Type: dict
booklore_role_docker_envs_default:
TZ: "{{ tz }}"
USER_ID: "{{ uid }}"
GROUP_ID: "{{ gid }}"
DATABASE_URL: "jdbc:mariadb://{{ booklore_name }}-mariadb:3306/{{ lookup('role_var', '_mariadb_docker_env_db', role='booklore') }}"
DATABASE_USERNAME: "root"
DATABASE_PASSWORD: "{{ lookup('role_var', '_docker_env_password', role='mariadb') }}"
APP_BOOKDROP_FOLDER: "{{ lookup('role_var', '_paths_bookdrop_location', role='booklore') }}"
booklore_role_docker_envs_custom
# Type: dict
booklore_role_docker_envs_custom: {}
Volumes
booklore_role_docker_volumes_default
# Type: list
booklore_role_docker_volumes_default:
- "{{ lookup('role_var', '_paths_location', role='booklore') }}/data:/app/data"
booklore_role_docker_volumes_custom
# Type: list
booklore_role_docker_volumes_custom: []
Labels
booklore_role_docker_labels_default
# Type: dict
booklore_role_docker_labels_default:
traefik.http.middlewares.booklore-kobo-sync-headers.headers.customrequestheaders.X-Scheme: "https"
booklore_role_docker_labels_custom
# Type: dict
booklore_role_docker_labels_custom: {}
Hostname
booklore_role_docker_hostname
# Type: string
booklore_role_docker_hostname: "{{ booklore_name }}"
Networks
booklore_role_docker_networks_alias
# Type: string
booklore_role_docker_networks_alias: "{{ booklore_name }}"
booklore_role_docker_networks_default
# Type: list
booklore_role_docker_networks_default: []
booklore_role_docker_networks_custom
# Type: list
booklore_role_docker_networks_custom: []
Restart Policy
booklore_role_docker_restart_policy
# Type: string
booklore_role_docker_restart_policy: unless-stopped
Stop Timeout
booklore_role_docker_stop_timeout
# Type: int
booklore_role_docker_stop_timeout: 10
State
booklore_role_docker_state
# Type: string
booklore_role_docker_state: started
Healthcheck
booklore_role_docker_healthcheck
# Type: dict
booklore_role_docker_healthcheck:
test: wget -q -O - http://localhost:6060/api/v1/healthcheck
interval: 60s
retries: 5
start_period: 60s
timeout: 10s
Dependencies
booklore_role_depends_on
# Type: string
booklore_role_depends_on: "{{ booklore_name }}-mariadb"
booklore_role_depends_on_delay
# Type: string (quoted number)
booklore_role_depends_on_delay: "0"
booklore_role_depends_on_healthchecks
# Type: string ("true"/"false")
booklore_role_depends_on_healthchecks: "false"
The following advanced options are available via create_docker_container but are not defined in the role. See: docker_container module
Resource Limits
booklore_role_docker_blkio_weight
# Type: int
booklore_role_docker_blkio_weight:
booklore_role_docker_cpu_period
# Type: int
booklore_role_docker_cpu_period:
booklore_role_docker_cpu_quota
# Type: int
booklore_role_docker_cpu_quota:
booklore_role_docker_cpu_shares
# Type: int
booklore_role_docker_cpu_shares:
booklore_role_docker_cpus
# Type: string
booklore_role_docker_cpus:
booklore_role_docker_cpuset_cpus
# Type: string
booklore_role_docker_cpuset_cpus:
booklore_role_docker_cpuset_mems
# Type: string
booklore_role_docker_cpuset_mems:
booklore_role_docker_kernel_memory
# Type: string
booklore_role_docker_kernel_memory:
booklore_role_docker_memory
# Type: string
booklore_role_docker_memory:
booklore_role_docker_memory_reservation
# Type: string
booklore_role_docker_memory_reservation:
booklore_role_docker_memory_swap
# Type: string
booklore_role_docker_memory_swap:
booklore_role_docker_memory_swappiness
# Type: int
booklore_role_docker_memory_swappiness:
booklore_role_docker_shm_size
# Type: string
booklore_role_docker_shm_size:
Security & Devices
booklore_role_docker_cap_drop
# Type: list
booklore_role_docker_cap_drop:
booklore_role_docker_cgroupns_mode
# Type: string
booklore_role_docker_cgroupns_mode:
booklore_role_docker_device_cgroup_rules
# Type: list
booklore_role_docker_device_cgroup_rules:
booklore_role_docker_device_read_bps
# Type: list
booklore_role_docker_device_read_bps:
booklore_role_docker_device_read_iops
# Type: list
booklore_role_docker_device_read_iops:
booklore_role_docker_device_requests
# Type: list
booklore_role_docker_device_requests:
booklore_role_docker_device_write_bps
# Type: list
booklore_role_docker_device_write_bps:
booklore_role_docker_device_write_iops
# Type: list
booklore_role_docker_device_write_iops:
booklore_role_docker_devices
# Type: list
booklore_role_docker_devices:
booklore_role_docker_groups
# Type: list
booklore_role_docker_groups:
booklore_role_docker_privileged
# Type: bool (true/false)
booklore_role_docker_privileged:
booklore_role_docker_security_opts
# Type: list
booklore_role_docker_security_opts:
booklore_role_docker_user
# Type: string
booklore_role_docker_user:
booklore_role_docker_userns_mode
# Type: string
booklore_role_docker_userns_mode:
Networking
booklore_role_docker_dns_opts
# Type: list
booklore_role_docker_dns_opts:
booklore_role_docker_dns_search_domains
# Type: list
booklore_role_docker_dns_search_domains:
booklore_role_docker_dns_servers
# Type: list
booklore_role_docker_dns_servers:
booklore_role_docker_domainname
# Type: string
booklore_role_docker_domainname:
booklore_role_docker_exposed_ports
# Type: list
booklore_role_docker_exposed_ports:
booklore_role_docker_hosts
# Type: dict
booklore_role_docker_hosts:
booklore_role_docker_hosts_use_common
# Type: bool (true/false)
booklore_role_docker_hosts_use_common:
booklore_role_docker_ipc_mode
# Type: string
booklore_role_docker_ipc_mode:
booklore_role_docker_links
# Type: list
booklore_role_docker_links:
booklore_role_docker_network_mode
# Type: string
booklore_role_docker_network_mode:
booklore_role_docker_pid_mode
# Type: string
booklore_role_docker_pid_mode:
booklore_role_docker_ports
# Type: list
booklore_role_docker_ports:
booklore_role_docker_uts
# Type: string
booklore_role_docker_uts:
Storage
booklore_role_docker_keep_volumes
# Type: bool (true/false)
booklore_role_docker_keep_volumes:
booklore_role_docker_mounts
# Type: list
booklore_role_docker_mounts:
booklore_role_docker_storage_opts
# Type: dict
booklore_role_docker_storage_opts:
booklore_role_docker_tmpfs
# Type: list
booklore_role_docker_tmpfs:
booklore_role_docker_volume_driver
# Type: string
booklore_role_docker_volume_driver:
booklore_role_docker_volumes_from
# Type: list
booklore_role_docker_volumes_from:
booklore_role_docker_volumes_global
# Type: bool (true/false)
booklore_role_docker_volumes_global:
booklore_role_docker_working_dir
# Type: string
booklore_role_docker_working_dir:
Monitoring & Lifecycle
booklore_role_docker_auto_remove
# Type: bool (true/false)
booklore_role_docker_auto_remove:
booklore_role_docker_cleanup
# Type: bool (true/false)
booklore_role_docker_cleanup:
booklore_role_docker_force_kill
# Type: string
booklore_role_docker_force_kill:
booklore_role_docker_healthy_wait_timeout
# Type: int
booklore_role_docker_healthy_wait_timeout:
booklore_role_docker_init
# Type: bool (true/false)
booklore_role_docker_init:
booklore_role_docker_kill_signal
# Type: string
booklore_role_docker_kill_signal:
booklore_role_docker_log_driver
# Type: string
booklore_role_docker_log_driver:
booklore_role_docker_log_options
# Type: dict
booklore_role_docker_log_options:
booklore_role_docker_oom_killer
# Type: bool (true/false)
booklore_role_docker_oom_killer:
booklore_role_docker_oom_score_adj
# Type: int
booklore_role_docker_oom_score_adj:
booklore_role_docker_output_logs
# Type: bool (true/false)
booklore_role_docker_output_logs:
booklore_role_docker_paused
# Type: bool (true/false)
booklore_role_docker_paused:
booklore_role_docker_recreate
# Type: bool (true/false)
booklore_role_docker_recreate:
booklore_role_docker_restart_retries
# Type: int
booklore_role_docker_restart_retries:
booklore_role_docker_stop_signal
# Type: string
booklore_role_docker_stop_signal:
Other Options
booklore_role_docker_capabilities
# Type: list
booklore_role_docker_capabilities:
booklore_role_docker_cgroup_parent
# Type: string
booklore_role_docker_cgroup_parent:
booklore_role_docker_commands
# Type: list
booklore_role_docker_commands:
booklore_role_docker_create_timeout
# Type: int
booklore_role_docker_create_timeout:
booklore_role_docker_entrypoint
# Type: string
booklore_role_docker_entrypoint:
booklore_role_docker_env_file
# Type: string
booklore_role_docker_env_file:
booklore_role_docker_labels_use_common
# Type: bool (true/false)
booklore_role_docker_labels_use_common:
booklore_role_docker_read_only
# Type: bool (true/false)
booklore_role_docker_read_only:
booklore_role_docker_runtime
# Type: string
booklore_role_docker_runtime:
booklore_role_docker_sysctls
# Type: list
booklore_role_docker_sysctls:
booklore_role_docker_ulimits
# Type: list
booklore_role_docker_ulimits:
booklore_role_autoheal_enabled
# Enable or disable Autoheal monitoring for the container created when deploying
# Type: bool (true/false)
booklore_role_autoheal_enabled: true
booklore_role_diun_enabled
# Enable or disable Diun update notifications for the container created when deploying
# Type: bool (true/false)
booklore_role_diun_enabled: true
booklore_role_dns_enabled
# Enable or disable automatic DNS record creation for the container
# Type: bool (true/false)
booklore_role_dns_enabled: true
booklore_role_docker_controller
# Enable or disable Saltbox Docker Controller management for the container
# Type: bool (true/false)
booklore_role_docker_controller: true
booklore_role_docker_networks_alias_custom
# Type: list
booklore_role_docker_networks_alias_custom:
booklore_role_docker_volumes_download
# Type: bool (true/false)
booklore_role_docker_volumes_download:
booklore_role_themepark_addons
# Type: string
booklore_role_themepark_addons:
booklore_role_themepark_app
# Type: string
booklore_role_themepark_app:
booklore_role_themepark_theme
# Type: string
booklore_role_themepark_theme:
booklore_role_traefik_api_endpoint
# Type: dict/omit
booklore_role_traefik_api_endpoint:
booklore_role_traefik_api_middleware
# Type: string
booklore_role_traefik_api_middleware:
booklore_role_traefik_api_middleware_http
# Type: string
booklore_role_traefik_api_middleware_http:
booklore_role_traefik_autodetect_enabled
# Enable Traefik autodetect middleware for the container
# Type: bool (true/false)
booklore_role_traefik_autodetect_enabled: false
booklore_role_traefik_crowdsec_enabled
# Enable CrowdSec middleware for the container
# Type: bool (true/false)
booklore_role_traefik_crowdsec_enabled: false
booklore_role_traefik_error_pages_enabled
# Enable custom error pages middleware for the container
# Type: bool (true/false)
booklore_role_traefik_error_pages_enabled: false
booklore_role_traefik_gzip_enabled
# Enable gzip compression middleware for the container
# Type: bool (true/false)
booklore_role_traefik_gzip_enabled: false
booklore_role_traefik_middleware_http
# Type: string
booklore_role_traefik_middleware_http:
booklore_role_traefik_middleware_http_api_insecure
# Type: bool (true/false)
booklore_role_traefik_middleware_http_api_insecure:
booklore_role_traefik_middleware_http_insecure
# Type: bool (true/false)
booklore_role_traefik_middleware_http_insecure:
booklore_role_traefik_priority
# Type: string
booklore_role_traefik_priority:
booklore_role_traefik_robot_enabled
# Enable robots.txt middleware for the container
# Type: bool (true/false)
booklore_role_traefik_robot_enabled: true
booklore_role_traefik_tailscale_enabled
# Enable Tailscale-specific Traefik configuration for the container
# Type: bool (true/false)
booklore_role_traefik_tailscale_enabled: false
booklore_role_traefik_wildcard_enabled
# Enable wildcard certificate for the container
# Type: bool (true/false)
booklore_role_traefik_wildcard_enabled: true
booklore_role_web_api_http_port
# Type: string (quoted number)
booklore_role_web_api_http_port:
booklore_role_web_api_http_scheme
# Type: string ("http"/"https")
booklore_role_web_api_http_scheme:
booklore_role_web_api_http_serverstransport
# Type: dict/omit
booklore_role_web_api_http_serverstransport:
booklore_role_web_api_port
# Type: string (quoted number)
booklore_role_web_api_port:
booklore_role_web_api_scheme
# Type: string ("http"/"https")
booklore_role_web_api_scheme:
booklore_role_web_api_serverstransport
# Type: dict/omit
booklore_role_web_api_serverstransport:
booklore_role_web_fqdn_override
# Override the Traefik fully qualified domain name (FQDN) for the container
# Type: list
booklore_role_web_fqdn_override:
Example Override
booklore_role_web_fqdn_override:
- "{{ traefik_host }}"
- "booklore2.{{ user.domain }}"
- "booklore.otherdomain.tld"
Note: Include {{ traefik_host }} to preserve the default FQDN alongside your custom entries
booklore_role_web_host_override
# Override the Traefik web host configuration for the container
# Type: string
booklore_role_web_host_override:
Example Override
booklore_role_web_host_override: "Host(`{{ traefik_host }}`) || Host(`{{ 'booklore2.' + user.domain }}`)"
Note: Use {{ traefik_host }} to include the default host configuration in your custom rule
booklore_role_web_http_port
# Type: string (quoted number)
booklore_role_web_http_port:
booklore_role_web_http_scheme
# Type: string ("http"/"https")
booklore_role_web_http_scheme:
booklore_role_web_http_serverstransport
# Type: dict/omit
booklore_role_web_http_serverstransport:
booklore_role_web_scheme
# URL scheme to use for web access to the container
# Type: string ("http"/"https")
booklore_role_web_scheme:
booklore_role_web_serverstransport
# Type: dict/omit
booklore_role_web_serverstransport: