Skip to content

Commit

Permalink
wip daapd internet-accessible
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerball committed Jan 19, 2019
1 parent 5e92c1b commit 202f7bb
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 7 deletions.
1 change: 1 addition & 0 deletions daapd.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ADMIN_PASSWORD=
4 changes: 3 additions & 1 deletion daapd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ RUN apt-get install -y \
libasound2-dev libmxml-dev libgcrypt11-dev libavahi-client-dev zlib1g-dev \
libevent-dev libplist-dev libsodium-dev libjson-c-dev libwebsockets-dev libcurl4-openssl-dev

RUN git clone https://github.com/ejurgensen/forked-daapd.git &&\
RUN git clone https://github.com/tylerball/forked-daapd.git &&\
cd forked-daapd &&\
git checkout configurable-websocket-protocol &&\
git pull &&\
autoreconf -i &&\
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-lastfm --enable-mpd &&\
make &&\
Expand Down
2 changes: 2 additions & 0 deletions daapd/forked-daapd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ general {
ipv6 = no
cache_path = "/home/tball/daapd/dbase_and_logs/cache.db"
trusted_networks = { "localhost", "192.168", "172", "fd" }
speaker_autoselect = no
admin_password = "placeholder"
}

library {
Expand Down
3 changes: 1 addition & 2 deletions daapd/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ mkdir -p /cache/forked-daapd
chown -R daapd /cache/forked-daapd
chmod -R u+rw /cache/forked-daapd

sed -i -e "s/name = \"Music Server\"/name = \"${MUSIC_SERVER_NAME:-Music Server}\"/" /etc/forked-daapd.conf
sed -i -e "s:/media:${MUSIC_SERVER_DATA:-/media}:" /etc/forked-daapd.conf
sed -i -e "s/admin_password = \"placeholder\"/admin_password = \"${ADMIN_PASSWORD:-}\"/" /etc/forked-daapd.conf

[ -d "/var/run" ] && rm -rf /var/run/*
mkdir -p /var/run/dbus
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ services:
- 80:80
- 443:443
- 8080:8080
# - 3688:3688
env_file:
- ./traefik.env
volumes:
Expand Down Expand Up @@ -65,7 +66,7 @@ services:
- 8123:8123
environment:
- TZ=America/Toronto
restart: unless-stopped
restart: always

spotify:
container_name: spotify
Expand Down Expand Up @@ -95,15 +96,14 @@ services:
container_name: daapd
build: daapd
network_mode: host
ports:
- 3689:3689
- 6600:6600
volumes:
- /mnt/pool/tunes:/mnt/pool/tunes:ro
- ./daapd/forked-daapd.conf:/etc/forked-daapd.conf
environment:
- MEDIA_SERVER_NAME=Home
- PUID=1000
env_file:
- ./daapd.env

syncthing:
container_name: syncthing
Expand Down
12 changes: 12 additions & 0 deletions traefik/rules.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,22 @@
[frontends.frontend-daapd.routes]
[frontends.frontend-daapd.routes.route-daapd-ext]
rule = "Host:daapd.2030davenport.com"
[frontends.frontend-daapd-ws]
entrypoints = ["ws"]
backend = "backend-daapd-ws"
passHostHeader = true
InsecureSkipVerify = true
[frontends.frontend-daapd-ws.routes.route-daapd-ext-ws]
rule = "Host:daapd.2030davenport.com"

[backends]
[backends.backend-daapd]
[backends.backend-daapd.servers]
[backends.backend-daapd.servers.server-daapd-ext]
url = "http://192.168.1.50:3689"
weight = 0
[backends.backend-daapd-ws]
[backends.backend-daapd-ws.servers]
[backends.backend-daapd-ws.servers.server-daapd-ext-ws]
url = "http://192.168.1.50:3687"
weight = 0
3 changes: 3 additions & 0 deletions traefik/traefik.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ defaultEntryPoints = ["https", "http"]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.ws]
address = ":3688"
[entryPoints.ws.tls]

[acme]
email = "tyler@tylerball.net"
Expand Down

0 comments on commit 202f7bb

Please sign in to comment.