Skip to content

Add Docker Compose deployment and update TES services#27

Merged
vschnei merged 2 commits into
mainfrom
Update_deployment_and_services
Jul 17, 2026
Merged

Add Docker Compose deployment and update TES services#27
vschnei merged 2 commits into
mainfrom
Update_deployment_and_services

Conversation

@vschnei

@vschnei vschnei commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a Docker Compose deployment for backend and frontend
  • update the supported ELIXIR TES instances
  • improve service-info discovery with normalized URLs
  • update the README with Docker Compose setup

Summary by Sourcery

Introduce Docker Compose-based deployment for the TES dashboard and improve TES instance discovery and authentication handling.

New Features:

  • Add a Docker Compose setup to run frontend and backend services together with health checks and persisted instance data.

Enhancements:

  • Update README to document Docker-based deployment, local development setup, API reference, and troubleshooting.
  • Expand backend service-info discovery to normalize TES URLs, support multiple endpoint patterns, and generate synthetic service info when only task endpoints are available.
  • Improve TES instance credential resolution for current ELIXIR and BIH endpoints, including token- and basic-auth-based access.
  • Refresh the list of supported TES instances in the frontend with updated ELIXIR and Poiesis services and identifiers.
  • Allow the frontend build to optionally override the API base URL via a Docker build argument while defaulting to nginx proxying.

feat(ui): various minor improvements
@sourcery-ai

sourcery-ai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds a Docker Compose-based deployment path, updates TES instance configuration and credentials, and improves TES service-info discovery and frontend API configuration to support more ELIXIR TES backends behind nginx/proxied setups.

Sequence diagram for TES service-info discovery with credentials and fallback endpoints

sequenceDiagram
  participant Frontend as Frontend
  participant Backend as Backend_API
  participant TES as TES_Instance
  participant Auth as get_instance_credentials

  Frontend->>Backend: GET /api/service_info?tes_url
  Backend->>Backend: get_service_info(tes_url)
  Backend->>Auth: get_instance_credentials("unknown", tes_url)
  Auth-->>Backend: { user, password, token }
  Backend->>TES: requests.get(tes_url + "/ga4gh/tes/v1/service-info", headers, auth)
  alt service-info exposed
    TES-->>Backend: 200 JSON payload
    Backend-->>Frontend: service info JSON
  else service-info not exposed
    Backend->>TES: requests.get(tes_url + "/v1/tasks", headers, auth)
    alt /v1/tasks reachable
      TES-->>Backend: 200 JSON payload
      Backend-->>Frontend: synthetic service info (from tasks payload)
    else auth required or other error
      TES-->>Backend: 401/403/other
      Backend-->>Frontend: error "Authentication required or credentials rejected"
    end
  end
Loading

File-Level Changes

Change Details Files
Introduce Docker Compose-based deployment for backend and frontend containers.
  • Add docker-compose.yml with backend and frontend services, healthcheck, volumes, ports, and restart policies
  • Wire backend container to mount TES config and instance state files and define healthcheck hitting /api/health
  • Configure frontend service build args so the React app defaults to nginx proxy for /api when REACT_APP_API_URL is empty
docker-compose.yml
Improve TES service-info discovery with normalized URLs and credential-aware requests.
  • Normalize TES URLs by stripping trailing slashes before use
  • Fetch per-instance credentials via get_instance_credentials and attach either Bearer token or basic auth to service-info requests
  • Expand the set of candidate service-info and task endpoints, including /ga4gh/tes/v1/service-info, /v1/service-info, /tasks/v1/service-info, and task endpoints
  • On successful /v1/tasks responses, synthesize a GA4GH-style service-info document using limited metadata
  • Treat 401/403 responses as auth-required but continue trying other endpoints rather than aborting immediately
backend/services/tes_service.py
Extend TES instance credential resolution for updated ELIXIR TES deployments.
  • Normalize instance_url in credential lookup by stripping trailing slashes
  • Replace legacy TESK* entries with new funnels/Poiesis/BiH-specific credential branches
  • Add specific env-var driven credentials for Funnel CZ, Funnel FI, TESK GR, and BIH token-based TES
  • Fall back to default FUNNEL_SERVER_USER/PASSWORD/TES_TOKEN when no specific mapping matches
backend/utils/auth_utils.py
Update the set of supported TES instances and their identifiers in the frontend constants.
  • Replace outdated TES instance list with new Funnel, TESK, and Poiesis entries for ELIXIR CZ, FI, GR, and BIH
  • Normalize URLs (e.g., add trailing slash where needed) and adjust IDs to namespaced elixir:: format
  • Remove local and legacy TES entries no longer supported by default
frontend/src/utils/constants.js
Allow React frontend to distinguish between unset and empty API base URL so Docker/nginx proxy can be used by default.
  • Adjust API base URL resolution to check explicitly for undefined/null rather than truthiness
  • Update frontend Dockerfile to accept REACT_APP_API_URL as a build arg and export it into the environment for npm build
frontend/src/services/api.js
frontend/Dockerfile
Rewrite README to focus on Docker Compose deployment, updated project structure, configuration, API reference, and troubleshooting.
  • Replace one-command shell script and older manual setup instructions with Docker-based workflow and separate local dev instructions
  • Refresh project structure tree to reflect new middleware, Dockerfiles, test data, and frontend pages/services
  • Document backend .env-based configuration and TES federation node config, and provide a concise API reference grouped by domain
  • Trim or reorganize older sections (tests, performance, security) and add Docker/TES-specific troubleshooting guidance and updated contribution steps
README.md

Possibly linked issues

  • #Improve TES instance discovery and deployment defaults for containerized setup: PR directly addresses the issue: adds Docker Compose, improves service-info discovery, updates TES instances, and Docker docs.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The Docker Compose setup hardcodes an IP for spe4hd.tes.bihealth.org via extra_hosts; consider moving this to environment or DNS configuration so deployments don’t rely on a specific static IP baked into version control.
  • In tes_service.get_service_info and related auth code, URL-based instance matching and credentials are spread across string checks; you might centralize these mappings in a configuration structure to make adding/updating TES instances less error-prone.
  • The new get_service_info logic uses multiple print statements and builds synthetic service-info for /v1/tasks responses; consider switching to the existing logging mechanism and clearly distinguishing synthetic vs real metadata in the returned payload to simplify downstream handling.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The Docker Compose setup hardcodes an IP for `spe4hd.tes.bihealth.org` via `extra_hosts`; consider moving this to environment or DNS configuration so deployments don’t rely on a specific static IP baked into version control.
- In `tes_service.get_service_info` and related auth code, URL-based instance matching and credentials are spread across string checks; you might centralize these mappings in a configuration structure to make adding/updating TES instances less error-prone.
- The new `get_service_info` logic uses multiple `print` statements and builds synthetic service-info for `/v1/tasks` responses; consider switching to the existing logging mechanism and clearly distinguishing synthetic vs real metadata in the returned payload to simplify downstream handling.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Docker Compose-based deployment path for the TES Dashboard (frontend + backend) and refreshes TES instance configuration/discovery so the app can better handle multiple TES endpoint layouts and authentication scenarios across updated ELIXIR/BIH services.

Changes:

  • Introduce a docker-compose.yml workflow to run frontend + backend together (including a backend healthcheck gate for the frontend).
  • Update TES instance lists/identifiers across frontend constants and backend instance location data.
  • Improve backend TES service-info discovery by normalizing URLs, trying multiple endpoint patterns, and supporting token/basic-auth when probing endpoints.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
README.md Updates setup instructions to emphasize Docker Compose deployment and refreshes API docs/troubleshooting.
docker-compose.yml Adds Compose services for backend and frontend, with healthcheck-based dependency ordering.
frontend/src/utils/constants.js Refreshes the built-in supported TES instance list (names/URLs/IDs).
frontend/src/services/api.js Adjusts API base URL selection to allow empty-string override for proxy-based deployments.
frontend/Dockerfile Adds a build arg/env to optionally override REACT_APP_API_URL at image build time.
backend/utils/auth_utils.py Updates instance credential resolution logic for current ELIXIR/BIH endpoints and normalizes instance URLs.
backend/tes_instance_locations.json Replaces/expands TES instance location metadata and identifiers.
backend/services/tes_service.py Expands service-info discovery: URL normalization, multiple endpoint attempts, and auth-aware probing.
backend/.tes_instances Updates the default persisted TES instance list used by the backend loader.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docker-compose.yml Outdated
Comment thread docker-compose.yml
Comment thread backend/tes_instance_locations.json
Comment thread backend/tes_instance_locations.json
Comment thread backend/tes_instance_locations.json
Comment thread backend/tes_instance_locations.json
Comment thread backend/tes_instance_locations.json
Comment thread backend/tes_instance_locations.json
Comment thread backend/tes_instance_locations.json
Comment thread backend/tes_instance_locations.json
Signed-off-by: Valentin Schneider-Lunitz <45590799+vschnei@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Comment thread backend/services/tes_service.py
Comment thread backend/utils/auth_utils.py
Comment thread docker-compose.yml
Comment on lines +7 to +10
environment:
PORT: 8000
FLASK_ENV: production
FLASK_DEBUG: "false"
Comment thread docker-compose.yml
@vschnei
vschnei merged commit 8c5c8f4 into main Jul 17, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants