Fix Docker volume mounts and database path for proper persistence

This commit is contained in:
2025-12-08 00:14:44 +00:00
parent 159d2be52d
commit ee433157f4
3 changed files with 11 additions and 8 deletions

View File

@@ -51,7 +51,12 @@ const libraryPath = path.isAbsolute(config.libraryPath)
? config.libraryPath
: path.join(process.cwd(), config.libraryPath);
app.use('/audio', express.static(libraryPath));
app.use('/artwork', express.static(path.join(process.cwd(), 'artwork')));
// Artwork can be in data directory (Docker) or root (local)
const artworkPath = process.env.NODE_ENV === 'production'
? path.join(process.cwd(), 'data', 'artwork')
: path.join(process.cwd(), 'artwork');
app.use('/artwork', express.static(artworkPath));
// Health check
app.get('/health', (req, res) => {