add docker config

This commit is contained in:
2026-03-26 23:41:52 -04:00
parent 8f62fa1935
commit e525b7faa3
8 changed files with 108 additions and 7 deletions

23
docker-compose.yml Normal file
View File

@@ -0,0 +1,23 @@
services:
app:
build: .
ports:
- 3000:3000
environment:
PORT: 3000
NODE_ENV: production
volumes:
# Runtime data — must map to /app/ since process.cwd() = /app in the container
- ./medialore.db:/app/medialore.db
- ./.thumbnails:/app/.thumbnails
# Library config — mounted as a directory so the atomic rename in the API works.
# A single-file bind-mount causes EBUSY on rename() because .tmp and the target
# end up on different devices. Initialize before first run:
# mkdir -p config && echo '[]' > config/libraries.json
- ./config:/config
# Mount your media folders and reference them in libraries.json using
# absolute /data/ paths, e.g. { "path": "/data/Games" }
- ./data:/data:ro
# - /path/to/your/movies:/data/Movies:ro
restart: unless-stopped