From f700eb66481a67bcd2b1779e37347d1a106ea64f Mon Sep 17 00:00:00 2001
From: Moritz Maxeiner <mm@ucw.sh>
Date: Fri, 4 Sep 2020 11:43:19 +0200
Subject: [PATCH] [jupyterhub] Allow persistent user settings and workspaces
 via /data/home

---
 jupyterhub/base/Dockerfile                 | 4 ++--
 jupyterhub/base/jupyter_notebook_config.py | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/jupyterhub/base/Dockerfile b/jupyterhub/base/Dockerfile
index c78ff37..9a97b83 100755
--- a/jupyterhub/base/Dockerfile
+++ b/jupyterhub/base/Dockerfile
@@ -71,8 +71,8 @@ RUN mkdir -p ~/.venv && \
     ipython kernel install --user --name=robofish
 
 COPY jupyter_notebook_config.py /root/.jupyter/
-COPY themes.jupyterlab-settings /root/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/
-COPY commands.jupyterlab-settings /root/.jupyter/lab/user-settings/@jupyterlab/codemirror-extension/
+ENV JUPYTERLAB_SETTINGS_DIR=/data/home/.config/jupyter/lab/user-settings
+ENV JUPYTERLAB_WORKSPACES_DIR=/data/home/.config/jupyter/lab/workspaces
 
 RUN chmod -x /etc/update-motd.d/*
 RUN mkdir /data
diff --git a/jupyterhub/base/jupyter_notebook_config.py b/jupyterhub/base/jupyter_notebook_config.py
index 8693fdd..c80131f 100755
--- a/jupyterhub/base/jupyter_notebook_config.py
+++ b/jupyterhub/base/jupyter_notebook_config.py
@@ -1,4 +1,4 @@
 c.NotebookApp.allow_root = True
-c.NotebookApp.terminado_settings = { 'shell_command': ['/bin/bash', '-l'] }
-c.MultiKernelManager.default_kernel_name = 'robofish'
-c.NotebookApp.notebook_dir = '/data'
+c.NotebookApp.terminado_settings = {"shell_command": ["/bin/bash", "-l"]}
+c.MultiKernelManager.default_kernel_name = "robofish"
+c.NotebookApp.notebook_dir = "/data"
-- 
GitLab