mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Store hub state inside install_prefix
rm -rf'ing the prefix should get rid of almost everything
This commit is contained in:
@@ -37,6 +37,8 @@ def ensure_jupyterhub_service(prefix):
|
|||||||
with open(proxy_secret_path, 'w') as f:
|
with open(proxy_secret_path, 'w') as f:
|
||||||
f.write('CONFIGPROXY_AUTH_TOKEN=' + secrets.token_hex(32))
|
f.write('CONFIGPROXY_AUTH_TOKEN=' + secrets.token_hex(32))
|
||||||
|
|
||||||
|
os.makedirs(os.path.join(INSTALL_PREFIX, 'hub', 'state'), mode=0o700, exist_ok=True)
|
||||||
|
|
||||||
|
|
||||||
def ensure_jupyterhub_package(prefix):
|
def ensure_jupyterhub_package(prefix):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ User=root
|
|||||||
Restart=always
|
Restart=always
|
||||||
# jupyterhub process should have no access to home directories
|
# jupyterhub process should have no access to home directories
|
||||||
ProtectHome=tmpfs
|
ProtectHome=tmpfs
|
||||||
# Use a persistent, permissioned state directory for db + cookie secrets
|
WorkingDirectory={install_prefix}/hub/state
|
||||||
StateDirectory=jupyterhub
|
|
||||||
WorkingDirectory=/var/lib/jupyterhub
|
|
||||||
# Protect bits that are normally shared across the system
|
# Protect bits that are normally shared across the system
|
||||||
PrivateTmp=yes
|
PrivateTmp=yes
|
||||||
PrivateDevices=yes
|
PrivateDevices=yes
|
||||||
|
|||||||
Reference in New Issue
Block a user