From af4671e2b25e0dfb8c60c654a92f1c47a37ce5de Mon Sep 17 00:00:00 2001 From: Jesse Date: Tue, 19 Nov 2019 13:13:15 -0500 Subject: [PATCH 1/4] adding ubooquity --- README.md | 1 + docs/applications/ubooquity.md | 24 ++++++++++++++++++ docs/configuration/application_ports.md | 2 ++ group_vars/all.yml.dist | 22 +++++++++++++++++ nas.yml | 4 +++ tasks/ubooquity.yml | 33 +++++++++++++++++++++++++ templates/traefik/traefik.toml | 1 + 7 files changed, 87 insertions(+) create mode 100644 docs/applications/ubooquity.md create mode 100644 tasks/ubooquity.yml diff --git a/README.md b/README.md index 1d1ac31a..2b8347fa 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ Ansible config and a bunch of Docker containers. * [TimeMachine](https://github.com/awlx/samba-timemachine) - Samba-based mac backup server * [Traefik](https://traefik.io/) - Web proxy and SSL certificate manager * [Transmission](https://transmissionbt.com/) - BitTorrent client (with OpenVPN if you have a supported VPN provider) +* [Ubooquity](http://vaemendis.net/ubooquity/) - Book and comic server * [Wallabag](https://wallabag.org/) - Save and classify articles. Read them later. * [Watchtower](https://github.com/v2tec/watchtower) - Monitor your Docker containers and update them if a new version is available * [ZNC](https://wiki.znc.in/ZNC) - IRC bouncer to stay connected to favourite IRC networks and channels diff --git a/docs/applications/ubooquity.md b/docs/applications/ubooquity.md new file mode 100644 index 00000000..55c656e2 --- /dev/null +++ b/docs/applications/ubooquity.md @@ -0,0 +1,24 @@ +# Ubooquity Comic and Book Server + +Homepage: [https://vaemendis.net/ubooquity/](https://vaemendis.net/ubooquity/) +Documentation: [https://vaemendis.github.io/ubooquity-doc/](https://vaemendis.github.io/ubooquity-doc/) +Docker Image: [https://hub.docker.com/r/linuxserver/ubooquity/](https://hub.docker.com/r/linuxserver/ubooquity/) + +Ubooquity is a free, lightweight and easy-to-use home server for your comics and ebooks. Use it to access your files from anywhere, with a tablet, an e-reader, a phone or a computer. +po +## Usage + +Set `ubooquity_enabled: true` in your `group_vars/all.yml` file. + +Access the webui at http://:2202/ubooquity by default. See specific configuration section below for information on setting up external access. + +## Specific Configuration + +Important note: if you want to access Ubooquity externally through Traefik (at ubooquity.yourdomain.tld), you need to go to http://:2203/ubooquity/admin and set the reverse proxy prefix to blank under "Advanced". Otherwise you will need to append "/ubooquity" to the url in order to access. + +### Admin login + +The admin portal is not exposed through Traefik. You can access the admin portal on port 2203. + +Upon your first run, the address is http://:2203/ubooquity/admin. You will be able to set the admin password here. + diff --git a/docs/configuration/application_ports.md b/docs/configuration/application_ports.md index 8412aedb..750649b7 100644 --- a/docs/configuration/application_ports.md +++ b/docs/configuration/application_ports.md @@ -48,5 +48,7 @@ By default, applications can be found on the ports listed below. | Traefik | 8083 | | | Transmission | 9091 | with VPN | | Transmission | 9092 | | +| Ubooquity | 2202 | | +| Ubooquity | 2203 | Admin | | Wallabag | 7780 | | | ZNC | 6677 | | diff --git a/group_vars/all.yml.dist b/group_vars/all.yml.dist index 60e1ca83..9e8752ac 100644 --- a/group_vars/all.yml.dist +++ b/group_vars/all.yml.dist @@ -88,6 +88,9 @@ mosquitto_enabled: false # Calibre calibre_enabled: false +# Ubooquity +ubooquity_enabled: false + # Smarthome openhab_enabled: false @@ -157,6 +160,9 @@ podcasts_root: "{{ samba_shares_root }}/podcasts" # Where your books are stored books_root: "{{ samba_shares_root }}/books" +# Where your books are stored +comics_root: "{{ samba_shares_root }}/comics" + # Where photos are stored photos_root: "{{ samba_shares_root }}/photos" @@ -237,6 +243,14 @@ samba_shares: browsable: yes path: "{{ samba_shares_root }}/books" + - name: comics + comment: 'Comics' + guest_ok: yes + public: yes + writable: yes + browsable: yes + path: "{{ samba_shares_root }}/comics" + ### ### NFS ### @@ -676,3 +690,11 @@ jellyfin_tv_directory: "{{ tv_root }}" jellyfin_tv_permissions: "rw" jellyfin_user_id: "0" jellyfin_group_id: "0" + +### +### Ubooquity +### +ubooquity_available_externally: "false" +ubooquity_data_directory: "{{ docker_home }}/ubooquity" +ubooquity_user_id: 0 +ubooquity_group_id: 0 \ No newline at end of file diff --git a/nas.yml b/nas.yml index af990049..5b516af4 100644 --- a/nas.yml +++ b/nas.yml @@ -199,3 +199,7 @@ - import_tasks: tasks/cloudcmd.yml when: (cloudcmd_enabled | default(False)) tags: cloudcmd + + - import_tasks: tasks/ubooquity.yml + when: (ubooquity_enabled | default(False)) + tags: ubooquity diff --git a/tasks/ubooquity.yml b/tasks/ubooquity.yml new file mode 100644 index 00000000..3476692f --- /dev/null +++ b/tasks/ubooquity.yml @@ -0,0 +1,33 @@ +--- +- name: Create Ubooquity Directories + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ ubooquity_data_directory }}" + +- name: Ubooquity Docker Container + docker_container: + name: ubooquity + image: linuxserver/ubooquity:latest + pull: true + volumes: + - "{{ ubooquity_data_directory }}/config:/config:rw" + - "{{ ubooquity_data_directory }}/files:/files:rw" + - "{{ comics_root }}:/comics" + - "{{ books_root }}:/books" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ ubooquity_user_id|quote }}" + PGID: "{{ ubooquity_group_id|quote }}" + MAXMEM: "1024" + ports: + - "2202:2202" + - "2203:2203" + restart_policy: unless-stopped + #memory: 1g + labels: + traefik.backend: "ubooquity" + traefik.frontend.rule: "Host:ubooquity.{{ ansible_nas_domain }}" + traefik.enable: "{{ ubooquity_available_externally }}" + traefik.port: "2202" diff --git a/templates/traefik/traefik.toml b/templates/traefik/traefik.toml index 1b6ca077..7ceb0bcf 100644 --- a/templates/traefik/traefik.toml +++ b/templates/traefik/traefik.toml @@ -212,5 +212,6 @@ onDemand = false # create certificate when container is created "thelounge.{{ ansible_nas_domain }}", "transmission.{{ ansible_nas_domain }}", "transmission-openvpn.{{ ansible_nas_domain }}", + "ubooquity.{{ ansible_nas_domain }}", "wallabag.{{ ansible_nas_domain }}", "znc.{{ ansible_nas_domain }}"] From 6f6988e3b059f316041a92eb5cb1265e85eafa48 Mon Sep 17 00:00:00 2001 From: Jesse Troy Beard Date: Thu, 12 Dec 2019 10:33:51 -0500 Subject: [PATCH 2/4] Update ubooquity.md --- docs/applications/ubooquity.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/applications/ubooquity.md b/docs/applications/ubooquity.md index 55c656e2..293d79d1 100644 --- a/docs/applications/ubooquity.md +++ b/docs/applications/ubooquity.md @@ -5,7 +5,7 @@ Documentation: [https://vaemendis.github.io/ubooquity-doc/](https://vaemendis.gi Docker Image: [https://hub.docker.com/r/linuxserver/ubooquity/](https://hub.docker.com/r/linuxserver/ubooquity/) Ubooquity is a free, lightweight and easy-to-use home server for your comics and ebooks. Use it to access your files from anywhere, with a tablet, an e-reader, a phone or a computer. -po + ## Usage Set `ubooquity_enabled: true` in your `group_vars/all.yml` file. From cfed9e0a66f5573e7f6c5537931cd9c7210e86f5 Mon Sep 17 00:00:00 2001 From: Jesse Troy Beard Date: Thu, 12 Dec 2019 10:34:31 -0500 Subject: [PATCH 3/4] Update all.yml.dist --- group_vars/all.yml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/group_vars/all.yml.dist b/group_vars/all.yml.dist index 9e8752ac..7e0250be 100644 --- a/group_vars/all.yml.dist +++ b/group_vars/all.yml.dist @@ -697,4 +697,4 @@ jellyfin_group_id: "0" ubooquity_available_externally: "false" ubooquity_data_directory: "{{ docker_home }}/ubooquity" ubooquity_user_id: 0 -ubooquity_group_id: 0 \ No newline at end of file +ubooquity_group_id: 0 From 4417d0946d41e90e7c554a0da2136a0649cec8a1 Mon Sep 17 00:00:00 2001 From: Jesse Troy Beard Date: Thu, 12 Dec 2019 10:34:58 -0500 Subject: [PATCH 4/4] Update ubooquity.yml --- tasks/ubooquity.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tasks/ubooquity.yml b/tasks/ubooquity.yml index 3476692f..6d159a22 100644 --- a/tasks/ubooquity.yml +++ b/tasks/ubooquity.yml @@ -25,7 +25,6 @@ - "2202:2202" - "2203:2203" restart_policy: unless-stopped - #memory: 1g labels: traefik.backend: "ubooquity" traefik.frontend.rule: "Host:ubooquity.{{ ansible_nas_domain }}"