diff --git a/README.md b/README.md index d2d21568..3181ae72 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,13 @@ Ansible config and a bunch of Docker containers. * A Docker host with Portainer for image and container management * An automatic dynamic DNS updater if you use Cloudflare to host your domain DNS * A Personal finance manager +* eBook management with calibre-web ### Docker Containers Used * [Airsonic](https://airsonic.github.io/) - catalog and stream music * [Bitwarden_rs](https://github.com/dani-garcia/bitwarden_rs) - Self-Hosting port of password manager +* [Calibre](https://hub.docker.com/r/linuxserver/calibre-web) - eBook Library * [Cloudflare DDNS](https://hub.docker.com/r/joshuaavalon/cloudflare-ddns/) - automatically update Cloudflare with your IP address * [CouchPotato](https://couchpota.to/) - for downloading and managing movies * [Duplicati](https://www.duplicati.com/) - for backing up your stuff diff --git a/docs/applications/calibre.md b/docs/applications/calibre.md new file mode 100644 index 00000000..3d55f9aa --- /dev/null +++ b/docs/applications/calibre.md @@ -0,0 +1,20 @@ +# Calibre(-web) eBook Library + +Homepage: [https://github.com/janeczku/calibre-web](https://github.com/linuxserver/docker-calibre-web) + + +Calibre-Web is a web app providing a clean interface for browsing, reading and downloading eBooks using an existing Calibre database. + +## Usage + +Set `calibre_enabled: true` in your `group_vars/all.yml` file. + +## Specific Configuration + +If you do not need eBook conversion you can disable it to save resources by setting the `calibre_ebook_conversion` variable in `group_vars/all.yml` file to be empty: +Conversion enabled: +`calibre_ebook_conversion: "linuxserver/calibre-web:calibre"` +Conversion disabled: +`calibre_ebook_conversion: ""` + +You can target just Calibre by appending `-t calibre` to your `ansible-playbook` command. \ No newline at end of file diff --git a/docs/configuration/application_ports.md b/docs/configuration/application_ports.md index f0f8e848..a03a9978 100644 --- a/docs/configuration/application_ports.md +++ b/docs/configuration/application_ports.md @@ -7,6 +7,7 @@ By default, applications can be found on the ports listed below. | Couchpotato | 5050 | | | Bitwarden "hub" | 3012 | Web Not. | | Bitwarden | 19080 | HTTP | +| Calibre | 8084 | HTTP | | Duplicati | 8200 | | | Emby | 8096 | HTTP | | Emby | 8920 | HTTPS | diff --git a/group_vars/all.yml.dist b/group_vars/all.yml.dist index 6b316b22..50a84bc6 100644 --- a/group_vars/all.yml.dist +++ b/group_vars/all.yml.dist @@ -77,6 +77,9 @@ wallabag_enabled: false # MQTT mosquitto_enabled: false +# Calibre +calibre_enabled: false + ### ### General ### @@ -137,6 +140,9 @@ music_root: "{{ samba_shares_root }}/music" # Where podcasts are stored podcasts_root: "{{ samba_shares_root }}/podcasts" +# Where your books are stored +books_root: "{{ samba_shares_root }}/books" + # The description that'll appear next to your Ansible-NAS box when browsing your network samba_server_string: Ansible NAS @@ -206,6 +212,14 @@ samba_shares: browsable: yes path: "{{ samba_shares_root }}/photos" + - name: books + comment: 'Books' + guest_ok: yes + public: yes + writable: yes + browsable: yes + path: "{{ samba_shares_root }}/books" + ### ### NFS ### @@ -571,7 +585,18 @@ nzbget_group_id: 0 wallabag_available_externally: "false" wallabag_data_directory: "{{ docker_home }}/wallabag" +### ### Mosquitto ### mosquitto_available_externally: "false" mosquitto_data_directory: "{{ docker_home }}/mosquitto" + +### +### Calibre +### +calibre_available_externally: "false" +calibre_data_directory: "{{ docker_home }}/calibre" +calibre_user_id: 0 +calibre_group_id: 0 +#To disable ebook conversion set calibre_ebook_conversion to "". To enable it set it to "linuxserver/calibre-web:calibre" +calibre_ebook_conversion: "linuxserver/calibre-web:calibre" \ No newline at end of file diff --git a/nas.yml b/nas.yml index c351ca5e..b570e5d5 100644 --- a/nas.yml +++ b/nas.yml @@ -171,3 +171,7 @@ - import_tasks: tasks/mosquitto.yml when: (mosquitto_enabled | default(False)) tags: mosquitto + + - import_tasks: tasks/calibre.yml + when: (calibre_enabled | default(False)) + tags: calibre \ No newline at end of file diff --git a/tasks/calibre.yml b/tasks/calibre.yml new file mode 100755 index 00000000..eaa854b0 --- /dev/null +++ b/tasks/calibre.yml @@ -0,0 +1,28 @@ +- name: Create Calibre Directories + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ calibre_data_directory }}/config" +- name: Calibre Docker Container + docker_container: + name: calibre + image: linuxserver/calibre-web:latest + pull: true + volumes: + - "{{ calibre_data_directory }}/config:/config" + - "{{ samba_shares_root }}/books:/books" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ calibre_user_id }}" + PGID: "{{ calibre_group_id }}" + DOCKER_MODS: "{{ calibre_ebook_conversion }}" + ports: + - "8084:8083" + restart_policy: unless-stopped + labels: + traefik.backend: "calibre" + traefik.frontend.rule: "Host:calibre.{{ ansible_nas_domain }}" + traefik.enable: "{{ calibre_available_externally }}" + traefik.port: "8083" + memory: 1g \ No newline at end of file diff --git a/templates/traefik/traefik.toml b/templates/traefik/traefik.toml index c22832eb..a099df99 100644 --- a/templates/traefik/traefik.toml +++ b/templates/traefik/traefik.toml @@ -181,6 +181,7 @@ onDemand = false # create certificate when container is created # we request a certificate for everything, because why not. sans = ["airsonic.{{ ansible_nas_domain }}", "bitwarden.{{ ansible_nas_domain }}", + "calibre.{{ ansible_nas_domain }}", "couchpotato.{{ ansible_nas_domain }}", "duplicati.{{ ansible_nas_domain }}", "emby.{{ ansible_nas_domain }}",