|
18 | 18 | from bento_lib.logging.structured import configure_structlog, configure_structlog_uvicorn |
19 | 19 | from bento_lib.service_info.types import GA4GHServiceType |
20 | 20 | from structlog.stdlib import get_logger |
21 | | -from urllib.parse import quote, urlparse |
| 21 | +from urllib.parse import urlparse |
22 | 22 | from dotenv import load_dotenv |
23 | 23 |
|
24 | 24 | from .. import __version__ |
@@ -109,10 +109,6 @@ def str_to_bool(value: str | None) -> bool: |
109 | 109 |
|
110 | 110 | SERVICE_TEMP = os.environ.get("KATSU_TEMP", os.environ.get("SERVICE_TEMP")) |
111 | 111 |
|
112 | | -# - DRS URL - by default in Bento Singularity context, use internal NGINX DRS (to avoid auth hassles) |
113 | | -NGINX_INTERNAL_SOCKET = quote(os.environ.get("NGINX_INTERNAL_SOCKET", "/chord/tmp/nginx_internal.sock"), safe="") |
114 | | -DRS_URL = os.environ.get("DRS_URL", f"http+unix://{NGINX_INTERNAL_SOCKET}/api/drs").strip().rstrip("/") |
115 | | - |
116 | 112 | # Application definition |
117 | 113 |
|
118 | 114 | INSTALLED_APPS = (["daphne"] if os.environ.get("BENTO_CONTAINER_LOCAL") else []) + [ |
@@ -374,8 +370,8 @@ def get_secret(path): |
374 | 370 |
|
375 | 371 | # SPECTACULAR_SETTINGS['SERVERS'] defines the url to which calls are made when |
376 | 372 | # testing a request within the swagger UI |
377 | | -if CHORD_URL: |
378 | | - SPECTACULAR_SETTINGS["SERVERS"] = [{"url": CHORD_URL + FORCE_SCRIPT_NAME}] |
| 373 | +if SERVICE_URL_BASE_PATH: |
| 374 | + SPECTACULAR_SETTINGS["SERVERS"] = [{"url": SERVICE_URL_BASE_PATH}] |
379 | 375 |
|
380 | 376 | # ---------------------------------------------------------------------------------------------------------------------- |
381 | 377 |
|
|
0 commit comments