Files
jupyterhub/examples/postgres/hub/jupyter_hub_config.py
Scott Sanderson b34a6d7f83 DEV: Use docker links to set password environment variable in the hub.
Also, yell at people if they use the default password.
2014-11-02 21:40:58 -05:00

18 lines
506 B
Python

# Configuration file for jupyterhub (postgres example).
c = get_config()
# Add some users.
c.JupyterHubApp.admin_users = {'rhea'}
c.Authenticator.whitelist = {'ganymede', 'io', 'rhea'}
# These environment variables are automatically supplied by the linked postgres
# container.
import os;
pg_pass = os.getenv('POSTGRES_ENV_JPY_PSQL_PASSWORD')
pg_host = os.getenv('POSTGRES_PORT_5432_TCP_ADDR')
c.JupyterHubApp.db_url = 'postgresql://jupyterhub:{}@{}:5432/jupyterhub'.format(
pg_pass,
pg_host,
)