diff --git a/.gitignore b/.gitignore index 77afef7a..bc783efb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,11 @@ node_modules .DS_Store build dist +# ignore config file at the top-level of the repo +# but not sub-dirs +/jupyterhub_config.py +jupyterhub_cookie_secret +jupyterhub.sqlite share/jupyter/static/components share/jupyter/static/css/style.min.css share/jupyter/static/css/style.min.css.map diff --git a/Dockerfile b/Dockerfile index b327d8aa..319542e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,5 +30,5 @@ WORKDIR /srv/jupyterhub/ EXPOSE 8000 -ONBUILD ADD jupyter_hub_config.py /srv/jupyterhub/jupyter_hub_config.py -CMD ["jupyterhub", "-f", "/srv/jupyterhub/jupyter_hub_config.py"] \ No newline at end of file +ONBUILD ADD jupyterhub_config.py /srv/jupyterhub/jupyterhub_config.py +CMD ["jupyterhub", "-f", "/srv/jupyterhub/jupyterhub_config.py"] diff --git a/examples/postgres/hub/jupyter_hub_config.py b/examples/postgres/hub/jupyterhub_config.py similarity index 100% rename from examples/postgres/hub/jupyter_hub_config.py rename to examples/postgres/hub/jupyterhub_config.py diff --git a/examples/sudo/jupyter_hub_config.py b/examples/sudo/jupyterhub_config.py similarity index 100% rename from examples/sudo/jupyter_hub_config.py rename to examples/sudo/jupyterhub_config.py diff --git a/jupyterhub/app.py b/jupyterhub/app.py index 74ce26a8..1ad573ee 100644 --- a/jupyterhub/app.py +++ b/jupyterhub/app.py @@ -93,7 +93,7 @@ class JupyterHubApp(Application): generate default config file: - jupyterhub --generate-config -f myconfig.py + jupyterhub --generate-config -f /etc/jupyterhub/jupyterhub.py spawn the server on 10.0.1.2:443 with https: @@ -110,7 +110,7 @@ class JupyterHubApp(Application): PAMAuthenticator, ]) - config_file = Unicode('jupyter_hub_config.py', config=True, + config_file = Unicode('jupyterhub_config.py', config=True, help="The config file to load", ) generate_config = Bool(False, config=True, diff --git a/jupyterhub/tests/test_app.py b/jupyterhub/tests/test_app.py index a8894e14..06213020 100644 --- a/jupyterhub/tests/test_app.py +++ b/jupyterhub/tests/test_app.py @@ -11,7 +11,7 @@ def test_help_all(): assert '--JupyterHubApp.ip' in out def test_generate_config(): - with NamedTemporaryFile(prefix='jupyter_hub_config', suffix='.py') as tf: + with NamedTemporaryFile(prefix='jupyterhub_config', suffix='.py') as tf: cfg_file = tf.name out = check_output([sys.executable, '-m', 'jupyterhub',