version: "3.7"

services:
  fhir2sql:
    depends_on:
      - "dashboard-db"
      - "blaze"
    image: docker.verbis.dkfz.de/cache/samply/fhir2sql:latest
    container_name: bridgehead-ccp-dashboard-fhir2sql
    environment:
      BLAZE_BASE_URL: "http://bridgehead-ccp-blaze:8080"
      PG_HOST: "dashboard-db"
      PG_USERNAME: "dashboard"
      PG_PASSWORD: "${DASHBOARD_DB_PASSWORD}" # Set in dashboard-setup.sh
      PG_DBNAME: "dashboard"

  dashboard-db:
    image: docker.verbis.dkfz.de/cache/postgres:${POSTGRES_TAG}
    container_name: bridgehead-ccp-dashboard-db
    environment:
      POSTGRES_USER: "dashboard"
      POSTGRES_PASSWORD: "${DASHBOARD_DB_PASSWORD}" # Set in dashboard-setup.sh
      POSTGRES_DB: "dashboard"
    volumes:
      - "/var/cache/bridgehead/ccp/dashboard-db:/var/lib/postgresql/data"

  focus:
    environment:
      POSTGRES_CONNECTION_STRING: "postgresql://dashboard:${DASHBOARD_DB_PASSWORD}@dashboard-db/dashboard"