roles/containers: navidrome added

This commit is contained in:
dogeystamp 2023-09-04 18:27:08 -04:00
parent bf130d2c3f
commit 892b5285cc
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
5 changed files with 48 additions and 0 deletions

View File

@ -7,6 +7,7 @@
website_path: /srv/http
gitea_domain: "git.{{ domain }}"
navidrome_domain: "mus.{{ domain }}"
## send renewal reminders to this address
email: null

View File

@ -16,3 +16,9 @@ http://{{ gitea_domain }} {
reverse_proxy {{ groups["gitea"][0] }}:3000
}
{% endif %}
{% if groups["navidrome"] | length > 0 %}
http://{{ navidrome_domain }} {
reverse_proxy {{ groups["navidrome"][0] }}:4533
}
{% endif %}

View File

@ -11,3 +11,8 @@ gitea_domain: "git.{{ domain }}"
vault_path: "{{ dataroot }}/syncthing/vault"
archive_path: "{{ dataroot }}/syncthing/vault_a"
syncthing_conf_dir: "{{ dataroot }}/syncthing/config"
# navidrome (music) path
music_path: "{{ dataroot }}/music"
navidrome_domain: "mus.{{ domain }}"

View File

@ -17,6 +17,23 @@
register: user_gitea
when: '"gitea" in groups'
- name: Create Navidrome user
user:
name: navidrome
register: user_navidrome
when: '"navidrome" in groups'
- name: Create Navidrome directories
file:
path: "{{ item }}"
state: directory
owner: navidrome
group: navidrome
mode: "u=rwX,g=rwX,o="
with_items:
- "{{ music_path }}"
- "{{ dataroot }}/navidrome"
- name: Create Syncthing group
group:
name: vault

View File

@ -6,6 +6,8 @@ version: "3"
networks:
gitea:
driver: bridge
navidrome:
driver: bridge
services:
{% if "gitea" in group_names %}
@ -45,3 +47,20 @@ services:
- {{ syncthing_conf_dir }}/:/var/syncthing/config
{% endif %}
{% if "navidrome" in group_names %}
navidrome:
container_name: navidrome
image: deluan/navidrome:latest
user: {{ user_navidrome.uid }}:{{ user_navidrome.group }}
environment:
ND_LISTENBRAINZ_ENABLED: true
restart: unless-stopped
volumes:
- "{{ dataroot }}/navidrome:/data"
- "{{ music_path }}/:/music:ro"
networks:
- navidrome
ports:
- "4533:4533"
{% endif %}