jupyterhub / systemdspawner

Spawn JupyterHub single-user notebook servers with systemd
BSD 3-Clause "New" or "Revised" License
92 stars 45 forks source link

Add dynamic_user_statedir configuration option. #135

Open bcbnz opened 1 year ago

bcbnz commented 1 year ago

This allows setting the StateDirectory option for a dynamic user to a subdirectory of /var/lib, allowing for easy backups or persistence between containers. By setting c.SystemdSpawner.dynamic_user_statedir = "jupyterhub_users/{USERNAME}" all state directories can be easily backed up from the /var/lib/private/jupyterhub_users directory instead of having to find the individual usernames.

The default is "{USERNAME}" which matches the previously-used state directories.

welcome[bot] commented 1 year ago

Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly. welcome You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada: