From 05ec1595e27f938225e8956a7e612aa5a983b562 Mon Sep 17 00:00:00 2001 From: Vladislav Ponomarev Date: Sun, 21 Apr 2024 18:57:55 +0700 Subject: [PATCH] Add LMS --- README.md | 1 + provisioning.yml | 1 + roles/filebrowser/defaults/main.yml | 2 ++ roles/filebrowser/tasks/main.yml | 22 ++++++++++++++++++++++ 4 files changed, 26 insertions(+) diff --git a/README.md b/README.md index 341dfb8..03b993c 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ Host mayurifag-prod | Go-socks5-proxy | (+auth) | 1080 | | Homer | | 8080 | | Hemmelig | | 3000 | +| LMS | | 5082 | | mayurifag.github.io | | 8005 | | Navidrome | | 80 | | Netdata | | 19999 | diff --git a/provisioning.yml b/provisioning.yml index 4e7b4ba..699059d 100644 --- a/provisioning.yml +++ b/provisioning.yml @@ -9,6 +9,7 @@ when: (bootstrap_enabled | default(True)) - hosts: all + gather_facts: no roles: ### ### Run general preparation diff --git a/roles/filebrowser/defaults/main.yml b/roles/filebrowser/defaults/main.yml index 6c3b550..a750019 100644 --- a/roles/filebrowser/defaults/main.yml +++ b/roles/filebrowser/defaults/main.yml @@ -4,6 +4,7 @@ filebrowser_available_externally: "true" filebrowser_data_directory: "{{ docker_home }}/filebrowser" filebrowser_files_directory: "{{ files_home }}/" +filebrowser_files_music_directory: "{{ files_home }}/Music/" filebrowser_container: "filebrowser/filebrowser" filebrowser_version: "v2.28.0-s6" @@ -12,6 +13,7 @@ filebrowser_subdomain: "fb" syncthing_subdomain: "st" sftpgo_subdomain: "sftp" webdav_subdomain: "webdav" +lms_subdomain: "lms" filebroswer_uid: "{{ admin_uid }}" filebroswer_gid: "{{ admin_gid }}" diff --git a/roles/filebrowser/tasks/main.yml b/roles/filebrowser/tasks/main.yml index 0267d74..188d7c8 100644 --- a/roles/filebrowser/tasks/main.yml +++ b/roles/filebrowser/tasks/main.yml @@ -16,6 +16,7 @@ - "{{ filebrowser_data_directory }}/config" - "{{ filebrowser_data_directory }}/syncthing_config" - "{{ filebrowser_data_directory }}/sftpgo_config" + - "{{ filebrowser_data_directory }}/lms_config" - name: Touch Filebrowser database file file: @@ -113,3 +114,24 @@ traefik.http.routers.webdav.rule: Host(`{{ webdav_subdomain }}.{{ server_hostname }}`) traefik.http.services.webdav.loadbalancer.server.port: "10080" traefik.http.routers.webdav.service: "webdav" + +- name: LMS Docker Container https://github.com/epoupon/lms + docker_container: + name: lms + image: epoupon/lms:3.51.0 + pull: true + recreate: yes + user: "{{ filebroswer_uid }}:{{ filebroswer_gid }}" + volumes: + - "{{ filebrowser_data_directory }}/lms_config:/var/lms" + - "{{ filebrowser_files_music_directory }}:/music:ro" + env: + TZ: "{{ server_timezone }}" + restart_policy: unless-stopped + labels: + traefik.enable: "{{ filebrowser_available_externally }}" + ### Web UI ### + traefik.http.routers.lms.rule: "Host(`{{ lms_subdomain }}.{{ server_hostname }}`)" + traefik.http.services.lms.loadbalancer.server.port: "5082" + traefik.http.routers.lms.service: "lms" + traefik.http.routers.lms.middlewares: "my-headers@file"