diff options
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | docs/docker.md | 57 |
2 files changed, 59 insertions, 0 deletions
@@ -37,6 +37,8 @@ services: This command or docker-compose file (depending on your choice) starts a container instance of slskd on ports 5000 (http) and 5001 (https), begins listening for incoming connections on port 50000, and maps the application directory to the provided path. +A more in-depth guide to running slskd in Docker can be found [here](https://github.com/slskd/slskd/blob/master/docs/docker.md). + ### With Binaries The latest stable binaries can be downloaded from the [releases](https://github.com/slskd/slskd/releases) page. Platform specific binaries, along with the static content for the web UI, are produced as artifacts from every [build](https://github.com/slskd/slskd/actions?query=workflow%3ACI), if you'd prefer to use a canary release. diff --git a/docs/docker.md b/docs/docker.md new file mode 100644 index 00000000..da999270 --- /dev/null +++ b/docs/docker.md @@ -0,0 +1,57 @@ +# Running slskd in Docker + +For most users, the quick start will be all that is needed: + +``` +docker run -d \ + -p 5000:5000 \ + -p 5001:5001 \ + -p 50000:50000 \ + -v <path/to/application/data>:/app \ + --name slskd \ + slskd/slskd:latest +``` + +This configuration, however, doesn't include any shared directories. + +Each share needs to be mapped to the container as a volume, and then each local directory within the container needs to be added to the configuration. + +In the following example, assume that the slskd application directory will be `/var/slskd` on the docker host. Assume that the directories `/home/JohnDoe/Music` and `/home/JohnDoe/eBooks` will be shared. + +For this scenario, the `docker run` command would be: + +``` +docker run -d \ + -p 5000:5000 \ + -p 5001:5001 \ + -p 50000:50000 \ + -v /var/slskd:/app \ + -v /home/JohnDoe/Music:/music \ + -v /home/JohnDoe/eBooks:/ebooks \ + --name slskd \ + slskd/slskd:latest +``` + +And the YAML configuration file would contain: + +```yaml +directories: + shared: + - /music + - /ebooks +``` + +Alternatively, the configuration of these shares could be achieved in the `docker run` command by setting the `SHARED_DIR` environment variable, like so: + +``` +docker run -d \ + -p 5000:5000 \ + -p 5001:5001 \ + -p 50000:50000 \ + -v /var/slskd:/app \ + -v /home/JohnDoe/Music:/music \ + -v /home/JohnDoe/eBooks:/ebooks \ + -e "SLSKD_SHARED_DIR=/music;/ebooks" \ + --name slskd \ + slskd/slskd:latest +```
\ No newline at end of file |
