2018-06-26 18:37:24 -07:00
|
|
|
# Template file for JupyterHub systemd service
|
|
|
|
|
# Uses simple string.format() for 'templating'
|
|
|
|
|
[Unit]
|
2018-06-27 23:41:19 -07:00
|
|
|
# CHP must have successfully started *before* we launch JupyterHub
|
|
|
|
|
Requires=configurable-http-proxy.service
|
|
|
|
|
After=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
|
2018-06-27 14:21:08 -07:00
|
|
|
WorkingDirectory={install_prefix}/hub/state
|
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!
|
2018-07-17 08:36:06 -07:00
|
|
|
EnvironmentFile={install_prefix}/hub/state/configurable-http-proxy.secret
|
2018-06-27 02:00:52 -07:00
|
|
|
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}
|
2018-06-28 00:49:36 -07:00
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
|
# Start service when system boots
|
|
|
|
|
WantedBy=multi-user.target
|