Run hub db migrations if needed before starting hub

This commit is contained in:
yuvipanda
2019-05-09 13:13:04 -07:00
parent 779e008674
commit 2a8c056a3b

View File

@@ -17,6 +17,9 @@ PrivateDevices=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
Environment=TLJH_INSTALL_PREFIX={install_prefix}
# Run upgrade-db before starting, in case Hub version has changed
# This is a no-op when no db exists or no upgrades are needed
ExecStartPre={python_interpreter_path} -m jupyterhub.app -f {jupyterhub_config_path} upgrade-db
ExecStart={python_interpreter_path} -m jupyterhub.app -f {jupyterhub_config_path}
[Install]