Skip to content

Commit

Permalink
Add LMS
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayurifag committed Apr 21, 2024
1 parent 0b67882 commit 05ec159
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ Host mayurifag-prod
| Go-socks5-proxy | <socks5://mayurifag.local:7777> (+auth) | 1080 |
| Homer | <http://homer.mayurifag.local> | 8080 |
| Hemmelig | <http://secret.mayurifag.local> | 3000 |
| LMS | <http://lms.mayurifag.local> | 5082 |
| mayurifag.github.io | <http://mayurifag.local> | 8005 |
| Navidrome | <http://mus.mayurifag.local> | 80 |
| Netdata | <http://netdata.mayurifag.local> | 19999 |
Expand Down
1 change: 1 addition & 0 deletions provisioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
when: (bootstrap_enabled | default(True))

- hosts: all

Check failure on line 11 in provisioning.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

name[play]

All plays should be named.
gather_facts: no
roles:
###
### Run general preparation
Expand Down
2 changes: 2 additions & 0 deletions roles/filebrowser/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -12,6 +13,7 @@ filebrowser_subdomain: "fb"
syncthing_subdomain: "st"

Check failure on line 13 in roles/filebrowser/defaults/main.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use filebrowser_ as a prefix. (vars: syncthing_subdomain)
sftpgo_subdomain: "sftp"

Check failure on line 14 in roles/filebrowser/defaults/main.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use filebrowser_ as a prefix. (vars: sftpgo_subdomain)
webdav_subdomain: "webdav"

Check failure on line 15 in roles/filebrowser/defaults/main.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use filebrowser_ as a prefix. (vars: webdav_subdomain)
lms_subdomain: "lms"

Check failure on line 16 in roles/filebrowser/defaults/main.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use filebrowser_ as a prefix. (vars: lms_subdomain)

filebroswer_uid: "{{ admin_uid }}"
filebroswer_gid: "{{ admin_gid }}"
22 changes: 22 additions & 0 deletions roles/filebrowser/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"

0 comments on commit 05ec159

Please sign in to comment.