Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore configuraiton options of NbExchange #171

Open
ykazakov opened this issue Sep 24, 2024 · 1 comment
Open

Restore configuraiton options of NbExchange #171

ykazakov opened this issue Sep 24, 2024 · 1 comment

Comments

@ykazakov
Copy link

It seems that the following documented configuration options are not actually used in the code:

c.NbExchange.base_url = /services/exchange
c.NbExchange.base_storage_location = /var/data/exchange/storage
c.NbExchange.db_url = mysql://username:password@my.msql.server.host:3306/db_name

Instead, the values of the following environment variables are used:

  • JUPYTERHUB_SERVICE_PREFIX
  • NBEX_BASE_STORE
  • NBEX_DB_URL

base_url = os.environ.get("JUPYTERHUB_SERVICE_PREFIX", "/services/nbexchange/")
base_storage_location = os.environ.get("NBEX_BASE_STORE", "/tmp/courses")

engine = create_engine(os.environ.get("NBEX_DB_URL", "sqlite:///:memory:"))

It would be nice to update documentation regarding these options.

Personally, I would prefer to use the configuration options over environment variables since this approach is more flexible: it is always possible to set the configuration options to the value of the variables, e.g.:

c.NbExchange.base_url = os.environ["JUPYTERHUB_SERVICE_PREFIX"]
@ykazakov
Copy link
Author

I think this is also related to #26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant