Skip to content

Commit

Permalink
Try to load dotenv in the sample config
Browse files Browse the repository at this point in the history
  • Loading branch information
dtaniwaki committed Feb 27, 2018
1 parent 4163608 commit 4f164d1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions jupyterhub_config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import os

try:
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
except ImportError:
pass

c.JupyterHub.hub_ip = '0.0.0.0'
c.JupyterHub.hub_port = int(os.environ.get('JUPYTERHUB_API_PORT', 8080))
c.JupyterHub.hub_connect_ip = os.environ['JUPYTERHUB_API_IP']
Expand Down

0 comments on commit 4f164d1

Please sign in to comment.