diff --git a/docker-host/setup/files/music.lablad b/docker-host/setup/files/music.lablad index 1eb9a23..72793f7 100644 --- a/docker-host/setup/files/music.lablad +++ b/docker-host/setup/files/music.lablad @@ -1,10 +1,6 @@ -# this file pertains to the gitea service which is served under the fqdn: -# git.lablad -# the default port is listed under /vars/main.yml as 3000 as gitea_pub_port - server { server_name music.lablad; location / { - proxy_pass http://127.0.0.1:6789; + proxy_pass http://127.0.0.1:4040; } } diff --git a/docker-host/setup/tasks/subsonic.yml b/docker-host/setup/tasks/subsonic.yml new file mode 100644 index 0000000..5be32ab --- /dev/null +++ b/docker-host/setup/tasks/subsonic.yml @@ -0,0 +1,37 @@ +# This playbook sets up subsonic with/without a fresh to work with +--- +- hosts: leftcoastlab + become: yes + vars: + SUBSONIC_DIR: /opt/subsonic/data + SUBSONIC_CONFIG_VOL: subsonic-config-volume + tasks: + - name: Include Vars + include_vars: + dir: ../vars + + + - name: Ensure Subsonic music directory exists + file: + path: "{{SUBSONIC_DIR}}" + state: directory + + - name: Ensure Subsonic configuration volume exists + community.docker.docker_volume: + name: "{{SUBSONIC_CONFIG_VOL}}" + state: present + + - name: Deploy Subsonic container + community.docker.docker_container: + name: subsonic + image: gzurowski/subsonic + restart_policy: always + recreate: yes + ports: + - "{{SUBSONIC_PORT}}:4040" + volumes: + - "{{SUBSONIC_DIR}}:/var/music" + log_driver: loki + log_options: + loki-url: "http://localhost:{{LOKI_PORT}}/loki/api/v1/push" + diff --git a/docker-host/setup/vars/main.yml b/docker-host/setup/vars/main.yml index 074a17f..b63188d 100644 --- a/docker-host/setup/vars/main.yml +++ b/docker-host/setup/vars/main.yml @@ -4,4 +4,6 @@ DEBIAN_CODENAME: sid GITEA_PUB_PORT: 3000 GITEA_SSH_PORT: 2222 FILEBROWSER_PORT: 8080 +LOKI_PORT: 3100 GRAFANA_PORT: 6000 +SUBSONIC_PORT: 4040