mirror of
https://github.com/funkypenguin/geek-cookbook/
synced 2025-12-13 09:46:23 +00:00
Add audiobookserver (#258)
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
---
|
||||
description: CHANGELOG - What's new in the cookbook
|
||||
search:
|
||||
exclude: true
|
||||
---
|
||||
|
||||
# CHANGELOG
|
||||
|
||||
This category lists the posts which highlight new and improved recipes in Funky Penguin's Geek Cookbook. The idea is that subscribing to the [RSS feed](/rss/) will provide automatic notification of fresh recipes!
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
---
|
||||
description: Funky Penguin's notes-in-progress
|
||||
title: Blog / Notes
|
||||
search:
|
||||
exclude: true
|
||||
---
|
||||
|
||||
# Notes
|
||||
|
||||
Sometimes you discover something which doesn't fit neatly into the "recipe" format. That's what this category of blog posts is for. I note information I don't want to loose, but I don't know (yet) how to fit it into the structure of the cookbook.
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
---
|
||||
description: My reviews of popular self-hosted apps
|
||||
title: Funky Penguin reviews self-hosted tools
|
||||
search:
|
||||
exclude: true
|
||||
---
|
||||
|
||||
# Funky Penguin's Reviews
|
||||
|
||||
I love experimenting with new self-hosted tools. Typically I'll review a tool while creating a recipe, although popular enough tools (*like [Plex][plex]*) don't **need** a review, in which case I'll just jump straight into the recipe!
|
||||
|
||||
--8<-- "common-links.md"
|
||||
--8<-- "common-links.md"
|
||||
|
||||
@@ -2,4 +2,6 @@ authors:
|
||||
- funkypenguin
|
||||
links:
|
||||
- 🛟 Get help: support.md
|
||||
- 🤝 Work with me: https://www.funkypenguin.co.nz/work-with-me
|
||||
- 🤝 Work with me: https://www.funkypenguin.co.nz/work-with-me
|
||||
search:
|
||||
boost: -0.1
|
||||
26
docs/blog/posts/changelog/new-recipe-audiobookshelf-swarm.md
Normal file
26
docs/blog/posts/changelog/new-recipe-audiobookshelf-swarm.md
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
date: 2023-03-10
|
||||
categories:
|
||||
- CHANGELOG
|
||||
tags:
|
||||
- audiobookshelf
|
||||
links:
|
||||
- Audiobookshelf recipe: recipes/audiobookshelf.md
|
||||
description: New Recipe Added - Audiobookshelf - self-hosted audiobook / podcast server with native mobile apps
|
||||
title: Added recipe for Audiobookshelf on Docker Swarm
|
||||
image: /images/audiobookshelf.png
|
||||
---
|
||||
|
||||
# Added recipe for Audiobookshelf (swarm)
|
||||
|
||||
Has your wife been wishing for a way to consume her DRM-stripped audiobooks on her phone, without having to resort to side-loading apps or media? Fear not, for this new recipe has received 10/10 WAF (wife-acceptance-factor)...
|
||||
|
||||
<!-- more -->
|
||||
|
||||
{ loading=lazy }
|
||||
|
||||
[Audiobookshelf][audiobookshelf] is a powerful audiobook / podcast streaming server, whose strength lies in its native app support on [Android](https://play.google.com/store/apps/details?id=com.audiobookshelf.app) / [iOS](https://testflight.apple.com/join/wiic7QIW) (*Testflight required*).
|
||||
|
||||
See the [recipe][audiobookshelf] for more!
|
||||
|
||||
--8<-- "common-links.md"
|
||||
@@ -23,4 +23,4 @@ MetalLB does two jobs:
|
||||
1. Provides address allocation to services out of a pool of addresses which you define
|
||||
2. Announces these addresses to devices outside the cluster, either using ARP/NDP (L2) or BGP (L3)
|
||||
|
||||
--8<-- "common-links.md"
|
||||
--8<-- "common-links.md"
|
||||
|
||||
@@ -10,9 +10,9 @@ description: Here's how to configure Renovate to only create 1 PR per-file, even
|
||||
|
||||
# Consolidating multiple manager changes in Renovate PRs
|
||||
|
||||
I work on several large clusters, administered using [FluxCD](/kubernetes/deployment/flux/), which in which we carefully manage the update of Helm releases using Flux's `HelmRelease` CR.
|
||||
I work on several large clusters, administered using [FluxCD](/kubernetes/deployment/flux/), which in which we carefully manage the update of Helm releases using Flux's `HelmRelease` CR.
|
||||
|
||||
Recently, we've started using [Renovate](https://github.com/renovatebot/renovate) to alert us to pending upgrades, by creating PRs when a helm update _or_ an image update in the associated helm values.yaml is available (*I like to put the upstream chart's values in to the `HelmRelease` so that changes can be tracked in one place*)
|
||||
Recently, we've started using [Renovate](https://github.com/renovatebot/renovate) to alert us to pending upgrades, by creating PRs when a helm update *or* an image update in the associated helm values.yaml is available (*I like to put the upstream chart's values in to the `HelmRelease` so that changes can be tracked in one place*)
|
||||
|
||||
The problem is, it's likely that the images in a chart's `values.yaml` **will** be updated when the chart is updated, but I don't need a separate PR for each image! (*imagine a helm chart with 10 image references!*)
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ description: Want to run your Mastodon instance behind Cloudflare, but put your
|
||||
|
||||
# Mastodon + CloudFlare + B2 Object Storage = free egress
|
||||
|
||||
When setting up my [Mastodon instance](https://so.fnky.nz), I jumped directly to storing all media in object storage (*Backblaze B2, in my case*), because I didn't want to allocate / estimate local storage requirements.
|
||||
When setting up my [Mastodon instance](https://so.fnky.nz), I jumped directly to storing all media in object storage (*Backblaze B2, in my case*), because I didn't want to allocate / estimate local storage requirements.
|
||||
|
||||
This turned out to be a great decision, as my media bucket quickly grew to over 100GB, but as a result, all of my media was served behind URLs like `https://f007.backblaze.com/file/something/something-else/another-something.jpg`, and could _technically_ be scraped without using my Mastodon URL.
|
||||
This turned out to be a great decision, as my media bucket quickly grew to over 100GB, but as a result, all of my media was served behind URLs like `https://f007.backblaze.com/file/something/something-else/another-something.jpg`, and could *technically* be scraped without using my Mastodon URL.
|
||||
|
||||
Here's how to improve this, and also serve your Mastodon instance from behind a CloudFlare proxy...
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ podAnnotations:
|
||||
2. This attaches the above volume at `/scratch`
|
||||
3. It's necessary to sleep for "a period" before attempting the restore, so that postegresql has time to start up and be ready to interact with the `pg_restore` command.
|
||||
|
||||
[^1]: Details at https://github.com/bitnami/charts/tree/main/bitnami/postgresql
|
||||
[^1]: See the bitnami chart [here](https://github.com/bitnami/charts/tree/main/bitnami/postgresql)
|
||||
|
||||
During the process of setting up the preHooks for various iterations of a postgresql instance, I discovered that Velero will not necessary check that carefully re whether the hooks returned successfully or not. It's best to completely simulate a restore/backup of your pods by execing into the pod, and running each hook command manually, ensuring that you get the expected result.
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
---
|
||||
search:
|
||||
exclude: true
|
||||
---
|
||||
# Tags
|
||||
|
||||
Following is a list of relevant tags:
|
||||
|
||||
[TAGS]
|
||||
|
||||
|
||||
BIN
docs/images/audiobookshelf.png
Normal file
BIN
docs/images/audiobookshelf.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 226 KiB |
@@ -1,42 +0,0 @@
|
||||
---
|
||||
hide:
|
||||
- navigation # Hide navigation
|
||||
---
|
||||
# CHANGELOG
|
||||
|
||||
## Recent additions
|
||||
|
||||
Recipe | Description | Date
|
||||
-------------------------|----------------------------------------------------------------------------------------------------------------------------------|--------------
|
||||
[Pixelfed][pixelfed] | Federated image sharing. Think "*looks like instagram, works like Mastodon*" | *10 Nov 2022*
|
||||
[Mastodon (K8s)][k8s/mastodon] | Kubernetes version of the Mastodon recipe below | *8 Aug 2022*
|
||||
[Mastodon][mastodon] | Federated social network. Think "*twitter but like email*" | *5 Aug 2022*
|
||||
[Kavita][kavita] | "Rocket-fueled" reader for manga/comics/ebooks, able to save reading position across devices/sessions | *27 Jul 2022*
|
||||
|
||||
## Recent updates
|
||||
|
||||
Recipe | Description | Date
|
||||
----------------------------|------------------------------------------------------------------------------|--------------
|
||||
[MetalLB][metallb] | Updated for CRDs required from v0.13, added diagrams explaining L3 vs L2 | *16 Jan 2023*
|
||||
[Nextcloud][nextcloud] | Updated for version 24, improve Redis / cron support | *24 Aug 2022*
|
||||
[Authelia][authelia] | Updated with test services, fixed errors | *27 Jul 2022*
|
||||
[Minio][minio] | Major update to Minio recipe, for new Console UI and Traefik v2 | *22 Oct 2021*
|
||||
|
||||
## Recent reviews
|
||||
|
||||
Recipe | Description | Date
|
||||
------------------------|--------------|-------------
|
||||
[Mastodon][review/mastodon] | First review | *9 Aug 2022*
|
||||
[Immich][review/immich] | First review | *3 Aug 2022*
|
||||
|
||||
## Subscribe to updates
|
||||
|
||||
<script async data-uid="20249aa846" src="https://funkypenguin.ck.page/20249aa846/index.js"></script>
|
||||
|
||||
Also available via:
|
||||
|
||||
* Mastodon: <https://so.fnky.nz/@geek_cookbook_changelog>
|
||||
* RSS: <https://so.fnky.nz/@geek_cookbook_changelog.rss>
|
||||
* The #changelog channel in our [Discord server](http://chat.funkypenguin.co.nz)
|
||||
|
||||
--8<-- "common-links.md"
|
||||
126
docs/recipes/audiobookshelf.md
Normal file
126
docs/recipes/audiobookshelf.md
Normal file
@@ -0,0 +1,126 @@
|
||||
---
|
||||
title: Run Audiobookshelf app in Docker
|
||||
description: Audiobookshelf is a self-hosted audiobook and podcast server, with native Android and iOS (Testflight) apps, supporting offline syncing
|
||||
---
|
||||
|
||||
# Audiobookshelf in Docker Swarm
|
||||
|
||||
[Audiobookshelf](https://www.audiobookshelf.org/) is a powerful audiobook / podcast streaming server, whose strength lies in its native app support on [Android](https://play.google.com/store/apps/details?id=com.audiobookshelf.app) / [iOS](https://testflight.apple.com/join/wiic7QIW) (*Testflight required*).
|
||||
|
||||
{ loading=lazy }
|
||||
|
||||
Features include:
|
||||
|
||||
* Fully open-source, including the [android & iOS app](https://github.com/advplyr/audiobookshelf-app) (in beta)
|
||||
* Stream all audio formats on the fly
|
||||
* Search and add podcasts to download episodes w/ auto-download
|
||||
* Multi-user support w/ custom permissions
|
||||
* Keeps progress per user and syncs across devices
|
||||
* Auto-detects library updates, no need to re-scan
|
||||
* Upload books and podcasts w/ bulk upload drag and drop folders
|
||||
* Backup your metadata + automated daily backups
|
||||
* Progressive Web App (PWA)
|
||||
* Chromecast support on the web app and android app
|
||||
* Fetch metadata and cover art from several sources
|
||||
* Basic ebook support and e-reader (*experimental*)
|
||||
* Merge your audio files into a single m4b w/ metadata and embedded cover (experimental)
|
||||
|
||||
The developers are actively making improvements (*as evidenced by the [audiobookserver github repo](https://github.com/advplyr/audiobookshelf)!*), and welcome suggestions. There's even a [Discord server](https://discord.gg/pJsjuNCKRq)!
|
||||
|
||||
## Audiobookshelf requirements
|
||||
|
||||
!!! summary "Ingredients"
|
||||
Already deployed:
|
||||
|
||||
* [X] [Docker swarm cluster](/docker-swarm/design/) with [persistent shared storage](/docker-swarm/shared-storage-ceph/)
|
||||
* [X] [Traefik](/docker-swarm/traefik/) configured per design
|
||||
|
||||
New:
|
||||
|
||||
* [ ] DNS entry for your auth host (*"audiobookshelf.yourdomain.com" is a good choice*), pointed to your [keepalived](/docker-swarm/keepalived/) IP
|
||||
|
||||
### Setup data locations
|
||||
|
||||
First, we create a directory to hold the metadata and config (*Audiobookshelf docs indicate that these should be separate directories*):
|
||||
|
||||
```bash
|
||||
mkdir /var/data/audiobookshelf/metadata
|
||||
mkdir /var/data/audiobookshelf/config
|
||||
```
|
||||
|
||||
### Setup environment
|
||||
|
||||
It's helpful to keep environment variables in a separate file, so create `/var/data/config/audiobookshelf/audiobookshelf.env`, as follows (*you may want to customise the UID/GID to match those of your media folder*):
|
||||
|
||||
```text
|
||||
AUDIOBOOKSHELF_UID=99
|
||||
AUDIOBOOKSHELF_GID=100
|
||||
```
|
||||
|
||||
### Audiobookshelf Docker Swarm config
|
||||
|
||||
Create a docker swarm config file in docker-compose syntax (v3), something like this example:
|
||||
|
||||
--8<-- "premix-cta.md"
|
||||
|
||||
```yaml title="/var/data/config/audiobookshelf/audiobookshelf.yml"
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
app:
|
||||
image: advplyr/audiobookshelf
|
||||
env_file: /var/data/config/audiobookshelf/audiobookshelf.env
|
||||
volumes:
|
||||
- /var/data/audiobookshelf/config:/config
|
||||
- /var/data/audiobookshelf/metadata:/metadata
|
||||
# Set this next volume to wherever you store your audiobook library.
|
||||
# You can define multiple libraries within this folder, like `/media/audio/podcasts`, `/media/audio/audiobooks`, etc
|
||||
- /var/data/media:/media
|
||||
deploy:
|
||||
replicas: 1
|
||||
labels:
|
||||
# traefik
|
||||
- traefik.enable=true
|
||||
- traefik.docker.network=traefik_public
|
||||
|
||||
# traefikv1
|
||||
- traefik.frontend.rule=Host:audiobookshelf.example.com
|
||||
- traefik.port=80
|
||||
|
||||
# traefikv2
|
||||
- "traefik.http.routers.audiobookshelf.rule=Host(`audiobookshelf.example.com`)"
|
||||
- "traefik.http.routers.audiobookshelf.entrypoints=https"
|
||||
- "traefik.http.services.audiobookshelf.loadbalancer.server.port=80"
|
||||
|
||||
networks:
|
||||
- traefik_public
|
||||
|
||||
networks:
|
||||
traefik_public:
|
||||
external: true
|
||||
```
|
||||
|
||||
!!! question "Should we use Traefik Forward Auth?"
|
||||
No, because (a) the mobile apps won't work with session/cookie based auth, and (b) the docs indicate that using middleware which alters CORS with Traefik will cause the app to error!
|
||||
|
||||
## Run Audiobookshelf
|
||||
|
||||
Launch the audiobookshelf stack by running ```docker stack deploy audiobookshelf -c <path -to-docker-compose.yml>```
|
||||
|
||||
### Setup audiobookshelf
|
||||
|
||||
Now hit the URL you created for Audiobookshelf, and you'll find yourself presented with the "Initial Server Setup". After creating a user and password, setup your libraries, and then either stream your audio directly in your browser, or fire up the [Android](https://play.google.com/store/apps/details?id=com.audiobookshelf.app) / [iOS app](https://testflight.apple.com/join/wiic7QIW) and listen on the go! [^1]
|
||||
|
||||
## Summary
|
||||
|
||||
What have we achieved? We can now easily consume our audio books / podcasts via Audiobookshelf, securely over our Traefik-exposed service! [^2]
|
||||
|
||||
!!! summary "Summary"
|
||||
Created:
|
||||
|
||||
* [X] Audiobookshelf is running, able to access your media libraries, and is streaming books / podcasts to you, wherever you are! :book: :headphones:
|
||||
|
||||
[^1]: The apps also allow you to download entire books to your device, so that you can listen without being directly connected!
|
||||
[^2]: Audiobookshelf pairs very nicely with [Readarr][readarr], and [Prowlarr][prowlarr], to automate your audio book sourcing and management!
|
||||
|
||||
--8<-- "recipe-footer.md"
|
||||
@@ -1,5 +1,7 @@
|
||||
---
|
||||
title: Docker Swarm Network allocations
|
||||
search:
|
||||
exclude: true
|
||||
---
|
||||
# Networks
|
||||
|
||||
|
||||
Reference in New Issue
Block a user