Add Navidrome support

This commit is contained in:
Slavi Pantaleev 2023-03-29 11:42:39 +03:00
parent e5ab7b6716
commit bd98a52f68
5 changed files with 182 additions and 0 deletions

141
docs/services/navidrome.md Normal file
View file

@ -0,0 +1,141 @@
# Navidrome
[Navidrome](https://www.navidrome.org/) is a [Subsonic-API](http://www.subsonic.org/pages/api.jsp) compatible music server.
## 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
########################################################################
# #
# navidrome #
# #
########################################################################
navidrome_enabled: true
navidrome_hostname: mash.example.com
navidrome_path_prefix: /navidrome
# By default, Navidrome will look at the /music directory for music files,
# controlled by the `navidrome_environment_variable_nd_musicfolder` variable.
#
# You'd need to mount some music directory into the Navidrome container, like shown below.
# The "Syncthing integration" section below may be relevant.
# navidrome_container_additional_volumes:
# - type: bind
# src: /on-host/path/to/music
# dst: /music
# options: readonly
########################################################################
# #
# /navidrome #
# #
########################################################################
```
### URL
In the example configuration above, we configure the service to be hosted at `https://mash.example.com/navidrome`.
You can remove the `navidrome_path_prefix` variable definition, to make it default to `/`, so that the service is served at `https://mash.example.com/`.
### Authentication
On first use (see [Usage](#usage) below), you'll be asked to create the first administrator user.
You can create additional users from the web UI after that.
### Syncthing integration
If you've got a [Syncthing](syncthing.md) service running, you can use it to synchronize your music directory onto the server and then mount it as read-only into the Navidrome container.
We recommend that you make use of the [aux](aux.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/music"
########################################################################
# #
# /aux #
# #
########################################################################
```
You can then mount this `{{ mash_playbook_base_path }}/storage/music` 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/music"
dst: /music
########################################################################
# #
# /syncthing #
# #
########################################################################
```
Finally, mount the `{{ mash_playbook_base_path }}/storage/music` directory into the Navidrome container as read-only:
```yaml
########################################################################
# #
# navidrome #
# #
########################################################################
# Other Navidrome configuration..
navidrome_container_additional_volumes:
- type: bind
src: "{{ mash_playbook_base_path }}/storage/music"
dst: /music
options: readonly
########################################################################
# #
# /navidrome #
# #
########################################################################
```
## Usage
After installation, you can go to the Navidrome URL, as defined in `navidrome_hostname` and `navidrome_path_prefix`.
As mentioned in [Authentication](#authentication) above, you'll be asked to create the first administrator user the first time you open the web UI.
You can also connect various Subsonic-API-compatible [apps](https://www.navidrome.org/docs/overview/#apps) (desktop, web, mobile) to your Navidrome instance.
## 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)

View file

@ -16,6 +16,7 @@
| [Hubsite](https://github.com/moan0s/hubsite) | A simple, static site that shows an overview of the available services | [Link](services/hubsite.md) |
| [Keycloak](https://www.keycloak.org/) | An open source identity and access management solution. | [Link](services/keycloak.md) |
| [Miniflux](https://miniflux.app/) | Minimalist and opinionated feed reader. | [Link](services/miniflux.md) |
| [Navidrome](https://www.navidrome.org/) | [Subsonic-API](http://www.subsonic.org/pages/api.jsp) compatible music server | [Link](services/navidrome.md)
| [NetBox](https://docs.netbox.dev/en/stable/) | Web application that provides [IP address management (IPAM)](https://en.wikipedia.org/wiki/IP_address_management) and [data center infrastructure management (DCIM)](https://en.wikipedia.org/wiki/Data_center_management#Data_center_infrastructure_management) functionality | [Link](services/netbox.md) |
| [Nextcloud](https://nextcloud.com/) | The most popular self-hosted collaboration solution for tens of millions of users at thousands of organizations across the globe. | [Link](services/nextcloud.md) |
| [PeerTube](https://joinpeertube.org/) | A tool for sharing online videos | [Link](services/peertube.md) |

View file

@ -99,6 +99,8 @@ devture_systemd_service_manager_services_list_auto: |
+
([{'name': (miniflux_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'miniflux']}] if miniflux_enabled else [])
+
([{'name': (navidrome_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'navidrome']}] if navidrome_enabled else [])
+
([{'name': (netbox_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'netbox', 'netbox-server']}] if netbox_enabled else [])
+
([{'name': (netbox_identifier + '-worker.service'), 'priority': 2500, 'groups': ['mash', 'netbox', 'netbox-worker']}] if netbox_enabled else [])
@ -781,6 +783,39 @@ miniflux_database_password: "{{ '%s' | format(mash_playbook_generic_secret_key)
########################################################################
# #
# navidrome #
# #
########################################################################
navidrome_enabled: false
navidrome_identifier: "{{ mash_playbook_service_identifier_prefix }}navidrome"
navidrome_uid: "{{ mash_playbook_uid }}"
navidrome_gid: "{{ mash_playbook_gid }}"
navidrome_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_base_directory_name_prefix }}navidrome"
navidrome_container_additional_networks_auto: |
{{
([mash_playbook_reverse_proxyable_services_additional_network] if mash_playbook_reverse_proxyable_services_additional_network else [])
}}
navidrome_container_labels_traefik_enabled: "{{ mash_playbook_traefik_labels_enabled }}"
navidrome_container_labels_traefik_docker_network: "{{ mash_playbook_reverse_proxyable_services_additional_network }}"
navidrome_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
navidrome_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
########################################################################
# #
# /navidrome #
# #
########################################################################
########################################################################
# #
# nextcloud #

View file

@ -78,6 +78,9 @@
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-keycloak.git
version: v21.0.1-1
name: keycloak
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-navidrome.git
version: v0.49.3-0
name: navidrome
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-netbox.git
version: v3.4.6-2.5.1-0
name: netbox

View file

@ -76,6 +76,8 @@
- role: galaxy/hubsite
- role: galaxy/navidrome
- role: galaxy/netbox
- role: galaxy/nextcloud