-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: tds #279
base: releases/v18
Are you sure you want to change the base?
feat: tds #279
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -204,6 +204,29 @@ BENTO_REFERENCE_DB_NAME="reference" | |
BENTO_REFERENCE_DB_USER="reference_user" | ||
# BENTO_REFERENCE_DB_PASSWORD is set in local.env | ||
|
||
# Transcriptomics Data Service | ||
# Service: | ||
BENTO_TDS_IMAGE=ghcr.io/bento-platform/transcriptomics_data_service | ||
BENTO_TDS_VERSION=pr-8 | ||
BENTO_TDS_VERSION_DEV=${BENTO_TDS_VERSION}-dev | ||
BENTO_TDS_CONTAINER_NAME=${BENTOV2_PREFIX}-tds | ||
BENTO_TDS_NETWORK=${BENTOV2_PREFIX}-tds-net | ||
BENTO_TDS_INTERNAL_PORT=${BENTO_STD_SERVICE_INTERNAL_PORT} | ||
BENTO_TDS_EXTERNAL_PORT=9520 | ||
BENTO_TDS_DEBUGGER_INTERNAL_PORT=9511 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this unique? |
||
BENTO_TDS_DEBUGGER_EXTERNAL_PORT=9511 | ||
BENTO_TDS_PLUGINS_DIR=${PWD}/lib/tds/plugins | ||
# Database | ||
BENTO_TDS_DB_IMAGE=postgres | ||
BENTO_TDS_DB_VERSION=16 | ||
BENTO_TDS_DB_CONTAINER_NAME=${BENTOV2_PREFIX}-tds-db | ||
BENTO_TDS_DB_NETWORK=${BENTOV2_PREFIX}-tds-db-net | ||
BENTO_TDS_DB_VOL_DIR=${BENTO_FAST_DATA_DIR}/tds/data | ||
BENTO_TDS_DB_EXTERNAL_PORT=9522 | ||
BENTO_TDS_DB_NAME="tds" | ||
BENTO_TDS_DB_USER="tds_user" | ||
# BENTO_TDS_DB_PASSWORD is set in local.env | ||
|
||
# WES | ||
BENTOV2_WES_IMAGE=ghcr.io/bento-platform/bento_wes | ||
BENTOV2_WES_VERSION=0.14.5 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,5 +71,10 @@ | |
}, | ||
"gateway": { | ||
"repository": "[email protected]:bento-platform/bento_gateway.git" | ||
}, | ||
"tds": { | ||
"service_kind": "tds", | ||
"url_template": "{BENTO_PORTAL_PUBLIC_URL}/api/{service_kind}", | ||
"repository": "[email protected]:bento-platform/transcriptomics_data_service.git" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
location /api/tds { return 302 https://${BENTOV2_PORTAL_DOMAIN}/api/tds/; } | ||
location /api/tds/ { | ||
# Reverse proxy settings | ||
include /gateway/conf/proxy.conf; | ||
include /gateway/conf/proxy_extra.conf; | ||
|
||
# Forward request to TDS | ||
rewrite ^ $request_uri; | ||
rewrite ^/api/tds/(.*) /$1 break; | ||
return 400; | ||
proxy_pass http://${BENTO_TDS_CONTAINER_NAME}:${BENTO_TDS_INTERNAL_PORT}$uri; | ||
|
||
# Errors | ||
error_log /var/log/bento_tds_errors.log; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
services: | ||
tds: | ||
image: ${BENTO_TDS_IMAGE}:${BENTO_TDS_VERSION} | ||
container_name: ${BENTO_TDS_CONTAINER_NAME} | ||
networks: | ||
- tds-net | ||
- tds-db-net | ||
expose: | ||
- ${BENTO_TDS_INTERNAL_PORT} | ||
depends_on: | ||
tds-db: | ||
condition: service_healthy | ||
environment: | ||
- BENTO_UID | ||
- BENTO_DEBUG=False | ||
- DATABASE_URI=postgres://${BENTO_TDS_DB_USER}:${BENTO_TDS_DB_PASSWORD}@${BENTO_TDS_DB_CONTAINER_NAME}:5432/${BENTO_TDS_DB_NAME} | ||
- INTERNAL_PORT=${BENTO_TDS_INTERNAL_PORT} | ||
- SERVICE_URL_BASE_PATH=${BENTOV2_PUBLIC_URL}/api/tds | ||
- CORS_ORIGINS=${BENTO_CORS_ORIGINS} | ||
- BENTO_AUTHZ_SERVICE_URL | ||
- BENTO_AUTHZ_ENABLED=True | ||
volumes: | ||
- ${BENTO_TDS_PLUGINS_DIR}:/tds/lib | ||
healthcheck: | ||
test: ["CMD", "curl", "http://localhost:${BENTO_TDS_INTERNAL_PORT}/service-info"] | ||
timeout: ${BENTO_HEALTHCHECK_TIMEOUT} | ||
interval: ${BENTO_HEALTHCHECK_INTERVAL} | ||
start_period: ${BENTO_HEALTHCHECK_START_PERIOD} | ||
start_interval: ${BENTO_HEALTHCHECK_START_INTERVAL} | ||
|
||
tds-db: | ||
image: ${BENTO_TDS_DB_IMAGE}:${BENTO_TDS_DB_VERSION} | ||
container_name: ${BENTO_TDS_DB_CONTAINER_NAME} | ||
networks: | ||
- tds-db-net | ||
environment: | ||
- POSTGRES_USER=${BENTO_TDS_DB_USER} | ||
- POSTGRES_PASSWORD=${BENTO_TDS_DB_PASSWORD} | ||
- POSTGRES_DB=${BENTO_TDS_DB_NAME} | ||
volumes: | ||
- ${BENTO_TDS_DB_VOL_DIR}:/var/lib/postgresql/data | ||
healthcheck: | ||
test: [ "CMD", "pg_isready", "-q", "-d", "${BENTO_TDS_DB_NAME}", "-U", "${BENTO_TDS_DB_USER}" ] | ||
timeout: ${BENTO_HEALTHCHECK_TIMEOUT} | ||
# interval: ${BENTO_HEALTHCHECK_INTERVAL} | ||
# For Docker <25 and Compose <2.24.x, start_interval doesn't work - use a shorter interval for now | ||
interval: ${BENTO_HEALTHCHECK_START_INTERVAL} | ||
start_period: ${BENTO_HEALTHCHECK_START_PERIOD} | ||
start_interval: ${BENTO_HEALTHCHECK_START_INTERVAL} | ||
|
||
networks: | ||
tds-net: | ||
external: true | ||
name: ${BENTO_TDS_NETWORK} | ||
tds-db-net: | ||
external: true | ||
name: ${BENTO_TDS_DB_NETWORK} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,6 +216,7 @@ def init_dirs(): | |
"reference-db": "BENTO_REFERENCE_DB_VOL_DIR", | ||
"wes": "BENTOV2_WES_VOL_DIR", | ||
"wes-tmp": "BENTOV2_WES_VOL_TMP_DIR", | ||
"tds-db": "BENTO_TDS_DB_VOL_DIR", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. put in alpha order |
||
|
||
# Feature-specific volume dirs - only if the relevant feature is enabled. | ||
# - internal IdP | ||
|
@@ -299,6 +300,8 @@ def init_docker(client: docker.DockerClient): | |
("BENTO_SERVICE_REGISTRY_NETWORK", dict(driver="bridge")), | ||
("BENTO_WEB_NETWORK", dict(driver="bridge")), | ||
("BENTO_WES_NETWORK", dict(driver="bridge")), | ||
("BENTO_TDS_NETWORK", dict(driver="bridge")), | ||
("BENTO_TDS_DB_NETWORK", dict(driver="bridge", internal=True)), # Does not need to access the web | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. put in alpha order (above W) |
||
) | ||
|
||
for net_var, net_kwargs in networks: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the debugger port can't match the service port