2018-06-26 18:37:24 -07:00
|
|
|
# Template file for JupyterHub systemd service
|
|
|
|
|
# Uses simple string.format() for 'templating'
|
|
|
|
|
[Unit]
|
2018-06-27 02:00:52 -07:00
|
|
|
Wants=configurable-http-proxy.service
|
2018-06-26 18:37:24 -07:00
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
User=root
|
|
|
|
|
Restart=always
|
2018-06-27 02:00:52 -07:00
|
|
|
# jupyterhub process should have no access to home directories
|
|
|
|
|
ProtectHome=tmpfs
|
|
|
|
|
# Use a persistent, permissioned state directory for db + cookie secrets
|
2018-06-26 18:37:24 -07:00
|
|
|
StateDirectory=jupyterhub
|
|
|
|
|
WorkingDirectory=/var/lib/jupyterhub
|
2018-06-27 02:00:52 -07:00
|
|
|
# Protect bits that are normally shared across the system
|
|
|
|
|
PrivateTmp=yes
|
|
|
|
|
PrivateDevices=yes
|
|
|
|
|
ProtectKernelTunables=yes
|
|
|
|
|
ProtectKernelModules=yes
|
|
|
|
|
# Source CONFIGPROXY_AUTH_TOKEN from here!
|
|
|
|
|
EnvironmentFile=/etc/jupyterhub/configurable-http-proxy.secret
|
|
|
|
|
Environment=TLJH_INSTALL_PREFIX={install_prefix}
|
2018-06-26 18:37:24 -07:00
|
|
|
ExecStart={python_interpreter_path} -m jupyterhub.app -f {jupyterhub_config_path}
|