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
This commit is contained in:
parent
016454c217
commit
50d9838652
5 changed files with 109 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -19,8 +19,9 @@ cache/*
|
||||||
embedded_gen.go
|
embedded_gen.go
|
||||||
dist
|
dist
|
||||||
music
|
music
|
||||||
docker-compose.yml
|
|
||||||
navidrome.db-shm
|
navidrome.db-shm
|
||||||
navidrome.db-wal
|
navidrome.db-wal
|
||||||
tags
|
tags
|
||||||
.gitinfo
|
.gitinfo
|
||||||
|
docker-compose.yml
|
||||||
|
!contrib/docker-compose.yml
|
7
contrib/docker-compose/Caddyfile
Normal file
7
contrib/docker-compose/Caddyfile
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
https://your.website {
|
||||||
|
reverse_proxy * navidrome:4533 {
|
||||||
|
header_up Host {http.reverse_proxy.upstream.hostport}
|
||||||
|
header_up X-Forwarded-For {http.request.remote}
|
||||||
|
header_up X-Real-IP {http.reverse_proxy.upstream.port}
|
||||||
|
}
|
||||||
|
}
|
31
contrib/docker-compose/docker-compose-caddy.yml
Normal file
31
contrib/docker-compose/docker-compose-caddy.yml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
version: '3.6'
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
caddy_data:
|
||||||
|
navidrome_data:
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
caddy:
|
||||||
|
container_name: "caddy"
|
||||||
|
image: caddy:2.6-alpine
|
||||||
|
restart: unless-stopped
|
||||||
|
read_only: true
|
||||||
|
volumes:
|
||||||
|
- "caddy_data:/data:rw"
|
||||||
|
- "./Caddyfile:/etc/caddy/Caddyfile:ro"
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
|
|
||||||
|
navidrome:
|
||||||
|
container_name: "navidrome"
|
||||||
|
image: deluan/navidrome:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
read_only: true
|
||||||
|
# user: 1000:1000
|
||||||
|
ports:
|
||||||
|
- "4533:4533"
|
||||||
|
volumes:
|
||||||
|
- "navidrome_data:/data"
|
||||||
|
#- "/mnt/music:/music:ro"
|
51
contrib/docker-compose/docker-compose-traefik.yml
Normal file
51
contrib/docker-compose/docker-compose-traefik.yml
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
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"
|
18
contrib/docker-compose/docker-compose.yml
Normal file
18
contrib/docker-compose/docker-compose.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
version: '3.6'
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
navidrome_data:
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
navidrome:
|
||||||
|
container_name: "navidrome"
|
||||||
|
image: deluan/navidrome:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
read_only: true
|
||||||
|
# user: 1000:1000
|
||||||
|
ports:
|
||||||
|
- "4533:4533"
|
||||||
|
volumes:
|
||||||
|
- "navidrome_data:/data"
|
||||||
|
#- "/mnt/music:/music:ro"
|
Loading…
Add table
Add a link
Reference in a new issue