mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 04:27:37 +03:00
* add docker compose examples, with traefik or caddy and without, fixes #476 * ignore the docker-compose in root, but not the one in contrib
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
version: "3.6"
|
|
|
|
volumes:
|
|
traefik_data:
|
|
navidrome_data:
|
|
|
|
services:
|
|
|
|
traefik:
|
|
container_name: "traefik"
|
|
image: traefik:2.9
|
|
restart: unless-stopped
|
|
read_only: true
|
|
command:
|
|
- "--log.level=ERROR"
|
|
- "--providers.docker=true"
|
|
- "--providers.docker.exposedbydefault=false"
|
|
- "--entrypoints.websecure.address=:443"
|
|
- "--certificatesresolvers.tc.acme.tlschallenge=true"
|
|
#- "--certificatesresolvers.tc.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
|
|
- "--certificatesresolvers.tc.acme.email=foo@foo.com"
|
|
- "--certificatesresolvers.tc.acme.storage=/letsencrypt/acme.json"
|
|
ports:
|
|
- "443:443"
|
|
volumes:
|
|
- "traefik_data:/letsencrypt"
|
|
#- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
|
|
|
navidrome:
|
|
container_name: "navidrome"
|
|
image: deluan/navidrome:latest
|
|
restart: unless-stopped
|
|
read_only: true
|
|
# user: 1000:1000
|
|
ports:
|
|
- "4533:4533"
|
|
environment:
|
|
ND_SCANINTERVAL: 6h
|
|
ND_LOGLEVEL: info
|
|
ND_SESSIONTIMEOUT: 168h
|
|
ND_BASEURL: ""
|
|
volumes:
|
|
- "navidrome_data:/data"
|
|
#- "/mnt/music:/music:ro"
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.navidrome.rule=Host(`foo.com`)"
|
|
- "traefik.http.routers.navidrome.entrypoints=websecure"
|
|
- "traefik.http.routers.navidrome.tls=true"
|
|
- "traefik.http.routers.navidrome.tls.certresolver=tc"
|
|
- "traefik.http.services.navidrome.loadbalancer.server.port=4533"
|