desktop-dotfiles/navidrome/docker-compose.yml
Davide Polonio 996f7a184d refactor(navidrome): replace custom Caddy build with pre-built image
Remove custom Dockerfile.caddy and use caddybuilds/caddy-namecheap:2-alpine
image directly in docker-compose.yml to simplify deployment
2025-08-23 15:18:56 +02:00

65 lines
1.6 KiB
YAML

services:
tailscale:
hostname: music
image: tailscale/tailscale:latest
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "tailscale status"]
interval: 1s
timeout: 5s
retries: 60
volumes:
- /srv/docker/navidrome/tailscale:/var/lib
- /lib/modules:/lib/modules:ro
devices:
- /dev/net/tun:/dev/net/tun
cap_add:
- net_admin
- sys_module
- net_raw
command: tailscaled
networks:
- internal
reverse_proxy:
image: caddybuilds/caddy-namecheap:2-alpine
restart: unless-stopped
network_mode: service:tailscale
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- /srv/docker/navidrome/caddy/config/:/config/caddy:rw
- /srv/docker/navidrome/caddy/data/:/data/caddy:rw
- /srv/docker/navidrome/caddy/share/:/usr/share/caddy:rw
env_file:
- caddy.env
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "https://music.lan.poldebra.me"]
interval: 10s
timeout: 30s
retries: 5
start_period: 90s
depends_on:
app:
condition: service_started
tailscale:
condition: service_healthy
app: # TODO rename me in navidrome!
image: deluan/navidrome:latest
user: 1000:1000 # should be owner of volumes
hostname: app
container_name: navidrome
restart: unless-stopped
volumes:
- /srv/docker/navidrome/data:/data
- /opt/bak/davide/backup_poldebra_nas/:/music:ro
networks:
internal:
ipv4_address: 172.20.0.5
networks:
internal:
ipam:
config:
- subnet: 172.20.0.0/24