From ae185d20d8d25dc7fadad3a317b64bb3df4d313c Mon Sep 17 00:00:00 2001 From: Jennings Zhang Date: Wed, 6 Dec 2023 08:45:29 -0500 Subject: [PATCH] Allow subjects dir to be customized using NIIVUEBROWSER_SUBJECTS_DIR --- Caddyfile | 2 +- README.md | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Caddyfile b/Caddyfile index 99942eb..125244b 100644 --- a/Caddyfile +++ b/Caddyfile @@ -8,7 +8,7 @@ :8080 { handle_path /files/* { - root * /data + root * {$NIIVUEBROWSER_SUBJECTS_DIR:/data} file_server * browse } handle { diff --git a/README.md b/README.md index 6a3165c..e254b12 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,17 @@ Prepare your data to adhere to the [naming conventions](#naming-conventions). Th ```shell docker run --rm --name niivue-browser \ -p 2019:2019 -p 8080:8080 \ - -v "/path/to/your/data:/data:ro" \ + -v "/path/on/host/to/your/data:/data:ro" \ + ghcr.io/fnndsc/niivue-browser:latest +``` + +For whatever reason, you can change the container directory where data is served from by setting `NIIVUEBROWSER_SUBJECTS_DIR`. + +```shell +docker run --rm --name niivue-browser \ + -p 2019:2019 -p 8080:8080 \ + -e NIIVUEBROWSER_SUBJECTS_DIR=/custom_dir + -v "/path/on/host/to/your/data:/custom_dir:ro" \ ghcr.io/fnndsc/niivue-browser:latest ```