Skip to content

Commit

Permalink
Merge pull request plasmabio#4 from yacchin1205/feature/rdm-nii-ac-jp
Browse files Browse the repository at this point in the history
[GRDM-30807] GRDM rdm.nii.ac.jpへの対応
  • Loading branch information
ikfj authored Jun 22, 2022
2 parents 79ef7f6 + a02429f commit d25f28c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="tljh-repo2docker",
version="0.0.1",
version="0.0.2",
entry_points={"tljh": ["tljh_repo2docker = tljh_repo2docker"]},
packages=find_packages(),
include_package_data=True,
Expand Down
13 changes: 9 additions & 4 deletions tljh_repo2docker/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import json
import os

from aiodocker import Docker
Expand Down Expand Up @@ -390,21 +391,25 @@ def tljh_custom_jupyterhub_config(c):
'rdm': RDMProvider,
'weko3': WEKO3Provider,
}
c.RDMProvider.hosts = [
rdm_provider_hosts = [
{
'hostname': ["https://osf.io/"],
'api': "https://api.osf.io/v2/"
},
{
'hostname': ["https://bh.rdm.yzwlab.com/"],
'api': "https://api.bh.rdm.yzwlab.com/v2/",
'hostname': ["https://rdm.nii.ac.jp"],
'api': "https://api.rdm.nii.ac.jp/v2/",
},
{
'hostname': ["https://rcos.rdm.nii.ac.jp"],
'api': "https://api.rcos.rdm.nii.ac.jp/v2/",
},
]

custom_hosts = os.environ.get('REPO2DOCKER_RDM_PROVIDER_HOSTS', None)
if custom_hosts is not None:
rdm_provider_hosts = json.loads(custom_hosts)
c.RDMProvider.hosts = rdm_provider_hosts

# register the handlers to manage the user images
c.JupyterHub.extra_handlers.extend(
[
Expand Down

0 comments on commit d25f28c

Please sign in to comment.