aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-12-03 08:25:48 -0600
committerJP Dillingham <jpdillingham@gmail.com>2021-12-03 08:25:48 -0600
commitb72c8a78042179e63168d03f57fa496f543a7cf8 (patch)
tree415eba3fd81aa88155f7f26f5f96ead1c701bcc3
parentde01b4f7fff0da0841ef4d55a34f4cd1067aedf4 (diff)
downloadslskd-b72c8a78042179e63168d03f57fa496f543a7cf8.tar.gz
add docker docs
-rw-r--r--README.md2
-rw-r--r--docs/docker.md57
2 files changed, 59 insertions, 0 deletions
diff --git a/README.md b/README.md
index 41119a78..e7d123d6 100644
--- a/README.md
+++ b/README.md
@@ -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