+ Subsonic reverse proxy configuration & ansible vars

These are the last pieces required to build out subsonic
This commit is contained in:
shockrah 2022-04-14 23:03:55 -07:00
parent 25009a4271
commit 004feae6a7
3 changed files with 40 additions and 5 deletions

View File

@ -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 {
server_name music.lablad; server_name music.lablad;
location / { location / {
proxy_pass http://127.0.0.1:6789; proxy_pass http://127.0.0.1:4040;
} }
} }

View File

@ -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"

View File

@ -4,4 +4,6 @@ DEBIAN_CODENAME: sid
GITEA_PUB_PORT: 3000 GITEA_PUB_PORT: 3000
GITEA_SSH_PORT: 2222 GITEA_SSH_PORT: 2222
FILEBROWSER_PORT: 8080 FILEBROWSER_PORT: 8080
LOKI_PORT: 3100
GRAFANA_PORT: 6000 GRAFANA_PORT: 6000
SUBSONIC_PORT: 4040