Added Navidrome configuration for my Raspberry PI 4
This commit is contained in:
@@ -3,4 +3,4 @@
|
|||||||
Useful Docker Compose to build project infrastructure on the fly.
|
Useful Docker Compose to build project infrastructure on the fly.
|
||||||
|
|
||||||
- Kafka
|
- Kafka
|
||||||
- Nginx + PostgreSQL
|
- Navidrome + Nginx + PostgreSQL
|
||||||
|
|||||||
@@ -1,28 +1,77 @@
|
|||||||
version: '2.4'
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
web:
|
navidrome:
|
||||||
image: nginx:1.19
|
image: deluan/navidrome:latest
|
||||||
container_name: web
|
container_name: navidrome
|
||||||
mem_limit: 256m
|
restart: unless-stopped
|
||||||
restart: on-failure
|
expose:
|
||||||
|
- "4533"
|
||||||
|
environment:
|
||||||
|
# Navidrome's database connection URL now references the secret for the password
|
||||||
|
# The secret file content will be mounted at /run/secrets/navidrome_db_password
|
||||||
|
ND_DATABASE_URL: "postgres://navidrome:$(cat /run/secrets/navidrome_db_password)@navidromedb:5432/navidrome_db?sslmode=disable"
|
||||||
|
# Other Navidrome environment variables...
|
||||||
|
ND_SESSIONTIMEOUT: 24h
|
||||||
|
ND_ENABLETRANSCODING: "true"
|
||||||
|
# ND_SCANSCHEDULE: 1h
|
||||||
|
# ND_LOGLEVEL: info
|
||||||
|
# ND_BASEURL: ""
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- $HOME/Volumes/nginx:/usr/share/nginx/html
|
- "/opt/navidrome/data:/data"
|
||||||
|
- "/opt/music:/music:ro"
|
||||||
|
user: "1000:1000" # Ensure this user has proper permissions on host volumes
|
||||||
|
networks:
|
||||||
|
- web
|
||||||
|
depends_on:
|
||||||
|
- navidromedb
|
||||||
|
# --- Declare the secret for Navidrome to use ---
|
||||||
|
secrets:
|
||||||
|
- navidrome_db_password # This name refers to the secret defined at the bottom
|
||||||
|
|
||||||
|
nginx-proxy-manager:
|
||||||
|
image: jc21/nginx-proxy-manager:latest
|
||||||
|
container_name: nginx-proxy-manager
|
||||||
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
|
- "81:81"
|
||||||
|
volumes:
|
||||||
|
- "/opt/npm/data:/data"
|
||||||
|
- "/opt/npm/letsencrypt:/etc/letsencrypt"
|
||||||
|
networks:
|
||||||
|
- web
|
||||||
|
|
||||||
postgres:
|
navidromedb:
|
||||||
image: postgres:13
|
image: postgres:13
|
||||||
container_name: postgres
|
container_name: navidromedb
|
||||||
ports:
|
restart: unless-stopped
|
||||||
- "5432:5432"
|
|
||||||
mem_limit: 2048m
|
mem_limit: 2048m
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_PASSWORD=docker
|
POSTGRES_DB: "navidrome_db"
|
||||||
restart: on-failure
|
POSTGRES_USER: "navidrome"
|
||||||
volumes:
|
# --- Use the secret for the PostgreSQL root password ---
|
||||||
- $HOME/Volumes/postgres:/var/lib/postgresql/data
|
# The secret file content will be mounted at /run/secrets/postgres_root_password
|
||||||
|
POSTGRES_PASSWORD_FILE: "/run/secrets/postgres_root_password" # Use _FILE suffix for secret files
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- "/opt/postgres/data:/var/lib/postgresql/data"
|
||||||
|
networks:
|
||||||
|
- web
|
||||||
|
# --- Declare the secret for Postgres to use ---
|
||||||
|
secrets:
|
||||||
|
- postgres_root_password # This name refers to the secret defined at the bottom
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
default:
|
web:
|
||||||
external:
|
external: false
|
||||||
name: hiyori-net
|
|
||||||
|
# --- Docker Secrets Definition ---
|
||||||
|
secrets:
|
||||||
|
navidrome_db_password: # This name is referenced by the 'navidrome' service
|
||||||
|
file: ./navidrome_db_password.txt # Path to your secret file on the host
|
||||||
|
|
||||||
|
postgres_root_password: # This name is referenced by the 'navidromedb' service
|
||||||
|
file: ./postgres_root_password.txt # Path to your secret file on the host
|
||||||
|
|||||||
1
Raspberry/navidrome_db_password.txt
Normal file
1
Raspberry/navidrome_db_password.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
your_navidrome_db_password_here
|
||||||
1
Raspberry/postgres_root_password.txt
Normal file
1
Raspberry/postgres_root_password.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
your_super_secret_postgres_password_here
|
||||||
Reference in New Issue
Block a user