Add Calibre-Web role (#199)
* initial commit * add non-rootless warning * fix identifier to calibre-web * add trailing version number * fix ref to music, and fix link name to CW --------- Co-authored-by: Slavi Pantaleev <slavi@devture.com>
This commit is contained in:
parent
d6be78bf44
commit
b7dc2c50b7
4 changed files with 192 additions and 8 deletions
136
docs/services/calibre_web.md
Normal file
136
docs/services/calibre_web.md
Normal file
|
@ -0,0 +1,136 @@
|
|||
# Calibre-Web
|
||||
|
||||
[Calibre-Web](https://github.com/janeczku/calibre-web) is a web app that offers a clean and intuitive interface for browsing, reading, and downloading eBooks using a valid [Calibre](https://calibre-ebook.com/) database.
|
||||
|
||||
**Warning** Paperless-ngx currently [does not support](https://hub.docker.com/r/linuxserver/calibre-web) running the container rootless, therefore the role has not the usual security features of other services provided by this playbook. This put your system more at higher risk as vulnerabilities can have a higher impact.
|
||||
|
||||
## Dependencies
|
||||
|
||||
This service requires the following other services:
|
||||
|
||||
- a [Traefik](traefik.md) reverse-proxy server
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
To enable this service, add the following configuration to your `vars.yml` file and re-run the [installation](../installing.md) process:
|
||||
|
||||
```yaml
|
||||
########################################################################
|
||||
# #
|
||||
# calibre-web #
|
||||
# #
|
||||
########################################################################
|
||||
|
||||
calibre_web_enabled: true
|
||||
|
||||
calibre_web_hostname: mash.example.com
|
||||
calibre_web_path_prefix: /calibre-web
|
||||
|
||||
# By default, calibre_web will look at the /books directory for your Calibre database.
|
||||
#
|
||||
# You'd need to mount some book directory into the calibre_web container, like shown below.
|
||||
# The "Syncthing integration" section below may be relevant.
|
||||
# calibre_web_container_additional_volumes:
|
||||
# - type: bind
|
||||
# src: /on-host/path/to/books
|
||||
# dst: /books
|
||||
|
||||
########################################################################
|
||||
# #
|
||||
# /calibre-web #
|
||||
# #
|
||||
########################################################################
|
||||
```
|
||||
|
||||
### URL
|
||||
|
||||
In the example configuration above, we configure the service to be hosted at `https://mash.example.com/calibre-web`.
|
||||
|
||||
You can remove the `calibre_web_path_prefix` variable definition, to make it default to `/`, so that the service is served at `https://mash.example.com/`.
|
||||
|
||||
### Authentication
|
||||
|
||||
The default username is `admin` and the default password is `admin123`.
|
||||
You'll be able to change the username and password, and add additional users in the web UI.
|
||||
|
||||
On the initial setup screen, enter /books as your calibre library location.
|
||||
If you haven't placed a Calibre database in that directory on the host yet, it will error as an invalid location.
|
||||
|
||||
### Syncthing integration
|
||||
|
||||
If you've got a [Syncthing](syncthing.md) service running, you can use it to synchronize your books directory onto the server and then mount it as read-only into the calibre_web container.
|
||||
|
||||
We recommend that you make use of the [aux](auxiliary.md) role to create some shared directory like this:
|
||||
|
||||
```yaml
|
||||
########################################################################
|
||||
# #
|
||||
# aux #
|
||||
# #
|
||||
########################################################################
|
||||
|
||||
aux_directory_definitions:
|
||||
- dest: "{{ mash_playbook_base_path }}/storage"
|
||||
- dest: "{{ mash_playbook_base_path }}/storage/books"
|
||||
|
||||
########################################################################
|
||||
# #
|
||||
# /aux #
|
||||
# #
|
||||
########################################################################
|
||||
```
|
||||
|
||||
You can then mount this `{{ mash_playbook_base_path }}/storage/books` directory into the Syncthing container and synchronize it with some other computer:
|
||||
|
||||
```yaml
|
||||
########################################################################
|
||||
# #
|
||||
# syncthing #
|
||||
# #
|
||||
########################################################################
|
||||
|
||||
# Other Syncthing configuration..
|
||||
|
||||
syncthing_container_additional_volumes:
|
||||
- type: bind
|
||||
src: "{{ mash_playbook_base_path }}/storage/books"
|
||||
dst: /books
|
||||
|
||||
########################################################################
|
||||
# #
|
||||
# /syncthing #
|
||||
# #
|
||||
########################################################################
|
||||
```
|
||||
|
||||
Finally, mount the `{{ mash_playbook_base_path }}/storage/books` directory into the calibre-web container as read-only:
|
||||
|
||||
```yaml
|
||||
########################################################################
|
||||
# #
|
||||
# calibre-web #
|
||||
# #
|
||||
########################################################################
|
||||
|
||||
# Other calibre-web configuration..
|
||||
|
||||
calibre_web_container_additional_volumes:
|
||||
- type: bind
|
||||
src: "{{ mash_playbook_base_path }}/storage/books"
|
||||
dst: /books
|
||||
|
||||
########################################################################
|
||||
# #
|
||||
# /calibre-web #
|
||||
# #
|
||||
########################################################################
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
After installation, you can go to the calibre-web URL, as defined in `calibre_web_hostname` and `calibre_web_path_prefix`.
|
||||
|
||||
## Recommended other services
|
||||
|
||||
- [Syncthing](syncthing.md) - a continuous file synchronization program which synchronizes files between two or more computers in real time. See [Syncthing integration](#syncthing-integration)
|
|
@ -186,6 +186,11 @@ mash_playbook_devture_systemd_service_manager_services_list_auto_itemized:
|
|||
{{ ({'name': (authelia_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'authelia']} if authelia_enabled else omit) }}
|
||||
# /role-specific:authelia
|
||||
|
||||
# role-specific:calibre-web
|
||||
- |-
|
||||
{{ ({'name': (calibre_web_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'calibre-web']} if calibre_web_enabled else omit) }}
|
||||
# /role-specific:calibre-web
|
||||
|
||||
# role-specific:changedetection
|
||||
- |-
|
||||
{{ ({'name': (changedetection_identifier + '.service'), 'priority': 2100, 'groups': ['mash', 'changedetection']} if changedetection_enabled else omit) }}
|
||||
|
@ -1562,6 +1567,41 @@ wetty_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolve
|
|||
|
||||
|
||||
|
||||
# role-specific:calibre-web
|
||||
########################################################################
|
||||
# #
|
||||
# calibre-web #
|
||||
# #
|
||||
########################################################################
|
||||
|
||||
calibre_web_enabled: false
|
||||
|
||||
calibre_web_identifier: "{{ mash_playbook_service_identifier_prefix }}calibre-web"
|
||||
|
||||
calibre_web_uid: "{{ mash_playbook_uid }}"
|
||||
calibre_web_gid: "{{ mash_playbook_gid }}"
|
||||
|
||||
calibre_web_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_base_directory_name_prefix }}calibre-web"
|
||||
|
||||
calibre_web_container_additional_networks_auto: |
|
||||
{{
|
||||
([mash_playbook_reverse_proxyable_services_additional_network] if mash_playbook_reverse_proxyable_services_additional_network else [])
|
||||
}}
|
||||
|
||||
calibre_web_container_labels_traefik_enabled: "{{ mash_playbook_traefik_labels_enabled }}"
|
||||
calibre_web_container_labels_traefik_docker_network: "{{ mash_playbook_reverse_proxyable_services_additional_network }}"
|
||||
calibre_web_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
|
||||
calibre_web_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
|
||||
|
||||
########################################################################
|
||||
# #
|
||||
# /calibre-web #
|
||||
# #
|
||||
########################################################################
|
||||
# /role-specific:calibre-web
|
||||
|
||||
|
||||
|
||||
# role-specific:clickhouse
|
||||
########################################################################
|
||||
# #
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
name: authelia
|
||||
activation_prefix: authelia_
|
||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-authentik.git
|
||||
version: v2024.4.1-0
|
||||
version: v2024.2.3-0
|
||||
name: authentik
|
||||
activation_prefix: authentik_
|
||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-aux.git
|
||||
|
@ -29,9 +29,13 @@
|
|||
name: auxiliary
|
||||
activation_prefix: aux_
|
||||
- src: git+https://gitlab.com/etke.cc/roles/backup_borg.git
|
||||
version: v1.2.8-1.8.11-0
|
||||
version: v1.2.8-1.8.10-0
|
||||
name: backup_borg
|
||||
activation_prefix: backup_borg_
|
||||
- src: git+https://github.com/lingawakad/ansible-role-calibre-web.git
|
||||
version: v0.6.21-0
|
||||
name: calibre-web
|
||||
activation_prefix: calibre-web
|
||||
- src: git+https://github.com/nielscil/ansible-role-changedetection.git
|
||||
version: v0.45.22-0
|
||||
name: changedetection
|
||||
|
@ -57,7 +61,7 @@
|
|||
name: docker
|
||||
activation_prefix: mash_playbook_docker_installation_enabled
|
||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-docker-registry.git
|
||||
version: v2.8.3-2
|
||||
version: v2.8.3-1
|
||||
name: docker_registry
|
||||
activation_prefix: docker_registry_enabled
|
||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-docker-registry-browser.git
|
||||
|
@ -109,7 +113,7 @@
|
|||
name: freshrss
|
||||
activation_prefix: freshrss_
|
||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-funkwhale.git
|
||||
version: v1.4.0-5
|
||||
version: v1.4.0-4
|
||||
name: funkwhale
|
||||
activation_prefix: funkwhale_
|
||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-gitea.git
|
||||
|
@ -145,7 +149,7 @@
|
|||
name: influxdb
|
||||
activation_prefix: influxdb_
|
||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-jitsi.git
|
||||
version: v9457-3
|
||||
version: v9457-2
|
||||
name: jitsi
|
||||
activation_prefix: jitsi_
|
||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-keycloak.git
|
||||
|
@ -177,7 +181,7 @@
|
|||
name: mariadb
|
||||
activation_prefix: mariadb_
|
||||
- src: git+https://gitlab.com/etke.cc/roles/miniflux.git
|
||||
version: v2.1.3-0
|
||||
version: v2.1.2-0
|
||||
name: miniflux
|
||||
activation_prefix: miniflux_
|
||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-mobilizon.git
|
||||
|
@ -201,7 +205,7 @@
|
|||
name: n8n
|
||||
activation_prefix: n8n_
|
||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-navidrome.git
|
||||
version: v0.52.0-0
|
||||
version: v0.51.1-0
|
||||
name: navidrome
|
||||
activation_prefix: navidrome_
|
||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-netbox.git
|
||||
|
@ -352,7 +356,7 @@
|
|||
name: traefik
|
||||
activation_prefix: devture_traefik_
|
||||
- src: git+https://gitlab.com/etke.cc/roles/uptime_kuma.git
|
||||
version: v1.23.13-0
|
||||
version: v1.23.12-0
|
||||
name: uptime_kuma
|
||||
activation_prefix: uptime_kuma_
|
||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-vaultwarden.git
|
||||
|
|
|
@ -126,6 +126,10 @@
|
|||
- role: galaxy/wetty
|
||||
# /role-specific:wetty
|
||||
|
||||
# role-specific:calibre-web
|
||||
- role: galaxy/calibre-web
|
||||
# /role-specific:calibre-web
|
||||
|
||||
# role-specific:clickhouse
|
||||
- role: galaxy/clickhouse
|
||||
# /role-specific:clickhouse
|
||||
|
|
Loading…
Reference in a new issue