Skip to content

Commit

Permalink
Added information about the new env: JUPYTERHUB_SERVICE_REDIRECT_URL …
Browse files Browse the repository at this point in the history
…in the docs.
  • Loading branch information
DeepCowProductions committed Dec 15, 2023
1 parent 660b58f commit fcbecff
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/user_guide/install_jupyterhub.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,26 @@ You may want to check the `list of command line arguments <cmdline.html>`_ for f

After you restart JupyterHub, you can verify the service is working as intended by logging into JupyterHub, clicking "Control Panel", then "Services -> ngshare". If you see the ``ngshare`` welcome page, you may proceed.

Environment variables
~~~~~~~~~~~~~~~~~~~~~

Like other Services and JupyterHub itself ngsahre support some configuration via the environment.

The follwing configuration might be necessary in case the JupyterHub is running behindd a reverse proxy.
``JUPYTERHUB_SERVICE_REDIRECT_URL`` is the URL that ``ngshare`` calles after the oauth authentication with the hub. For example: ``/my_hub_proxy_prefix/services/ngshare/```. The default values is ``/services/ngshare/```.

Example for hub-managed-services:
.. code:: python
c.JupyterHub.services.append(
{
'name': 'ngshare',
'url': 'http://127.0.0.1:10101',
'command': ['python3', '-m', 'ngshare', '--admins', 'admin,admin2'],
'environment': { 'JUPYTERHUB_SERVICE_REDIRECT_URL': '/my_hub_proxy_prefix/services/ngshare/'}
}
)
Installing ngshare_exchange
---------------------------

Expand Down
5 changes: 5 additions & 0 deletions docs/user_guide/install_unmanaged.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ Mocking Required Environment Variables

``JUPYTERHUB_SERVICE_URL`` is the URL that ``ngshare`` should be accessible on. For example, if ``ngshare`` has IP ``10.1.2.3`` and you want ``ngshare`` to listen on port 1234, this should be ``http://10.1.2.3:1234``. Changing this will affect ``ngshare``'s port.

Additional Environment Variables for ngshare
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The follwing variable might be necessary in case the JupyterHub is running behindd a reverse proxy.
``JUPYTERHUB_SERVICE_REDIRECT_URL`` is the URL that ``ngshare`` calles after the oauth authentication with the hub. For example: ``/my_hub_proxy_prefix/services/ngshare/```. The default values is ``/services/ngshare/```.

Running ``ngshare``
^^^^^^^^^^^^^^^^^^^
After configuring the environment variables, you may start ngshare as a service. You should also take a look at the `list of command line arguments <cmdline.html>`_ for further configuration.
Expand Down

0 comments on commit fcbecff

Please sign in to comment.