diff --git a/docsite/docs/installation/installation.mdx b/docsite/docs/installation/installation.mdx index 93a29296..47fca7f5 100644 --- a/docsite/docs/installation/installation.mdx +++ b/docsite/docs/installation/installation.mdx @@ -42,7 +42,7 @@ Cross-platform images are built for x86 (Intel/AMD) and ARM64 (IE Raspberry Pi) -You **should** bind a host directory into the container for storing configurations and credentials. Otherwise, these will be lost when the container is updated. +You **should** bind a host directory into the container for storing configurations, credentials, database, and other files. Otherwise, these will be lost when the container is updated. ```yaml title="docker-compose.yml" services: @@ -54,6 +54,24 @@ services: // highlight-end ``` +Optionally, use a separate directory for data (database, cache, etc...) by mounting an additional directory and setting the `DATA_DIR` ENV to the directory that should be used inside the container: + +```yaml title="docker-compose.yml" +services: + multi-scrobbler: + # ... + environment: + # ... + // highlight-start + - DATA_DIR=/msData + // highlight-end + volumes: + - "./config:/config" # used for config files + // highlight-start + - "./my/host/folder:/msData" # used for data files + // highlight-end +``` + If you are using a [bridge network](https://www.appsdeveloperblog.com/docker-networking-bridging-host-and-overlay/) (default docker setup) you must map a port to the container in order to access the dashboard and use MS with some sources (Webscrobbler, LFM/LZ Endpoints). The default container port is `9078`. @@ -231,6 +249,33 @@ npm run docs:install && npm run build npm run start ``` +#### Config And Data Directories + +The directories MS uses for **Configuration** (`config.json`, `jellyfin.json`, etc...) and **Data** (database, cache, etc...) can be specified by environmental variables passed directly to `npm`/`node`, or set in an `.env` file in the working directory. + +When parsing these ENVs MS will resolve relative directories but *not* bash expansions like `~` for home. Examples: + +* `CONFIG_DIR=/my/absolute/path` => sets directory to use for config files +* `DATA_DIR=./relative/data` => sets directory relative to working directory for data files + +If you do not set these environmental variables then MS will attempt to use OS-standardized directories: + + + + * Config => `$XDG_CONFIG_HOME/multi-scrobbler` or `~/.config/multi-scrobbler` + * Data => `$XDG_DATA_HOME/multi-scrobbler` or `~/.local/share/multi-scrobbler` + + + * Config => `~/Library/Preferences/multi-scrobbler` + * Data => `~/Library/Application Support/multi-scrobbler` + + + * Config => `%APPDATA%\multi-scrobbler\Config` + * Data => `%LOCALAPPDATA%\multi-scrobbler\Data` + + + + #### Rollup build error During building if you encounter an error like: `Your current platform "XXX" and architecture "XXX" combination is not yet supported by the native Rollup build.`