version: "3.7"

# these are the services that require the /ingest endpoint
services:
  demo:
    image: ${DEMO_IMAGE:-eu.gcr.io/dev-and-test-env/demo-signup:dev}
    environment:
      JAEGER_DISABLED: "false"
      JAEGER_AGENT_HOST: tracing
      DEMO_TENANTID: c63feae0-4e86-425e-8863-4a6c7ed00d4d
      DEMO_HTTP_ADDRESS: 0.0.0.0:8989
      # export DEMO_RECAPTCHA_CLIENT_KEY=6Lf7Hu4aAAAAAK3GdG86fOIU1zNG6J-_VikVBV9S
      DEMO_RECAPTCHA_CLIENT_KEY: $DEMO_RECAPTCHA_CLIENT_KEY
    ports:
      - "127.0.0.1:8989:8989"
    command:
      - "/bin/demo-signup"
      - "--log-level=DEBUG"
      - "--debug=true"
      - "--tenant-slug="
      - "--idp-path-prefix=auth"
      - "--hub-path-prefix=hub"
      - "--api-base-url=http://nginx:80"
    depends_on:
      - hub
      - auth
    volumes:
      - ./config/demo-signup/assets:/data/assets
      - ./config/demo-signup/secrets:/secrets

  # deployment of sync-ingester that sends requests through the ingress
  # we plan to deprecate this sevice and directly integrate the ingest endpoint
  # into Hub.
  sync-ingester:
    image: ${SYNC_INGESTER_IMAGE:-eu.gcr.io/dev-and-test-env/sync-ingester:latest}
    environment:
      JAEGER_DISABLED: "false"
      JAEGER_AGENT_HOST: tracing
      JAEGER_SAMPLER_MANAGER_HOST_PORT: tracing:5778
      JAEGER_SAMPLER_TYPE: remote
      JAEGER_SAMPLER_PARAM: 1
      LOG_LEVEL: "debug"
    ports:
      - "3333"
    volumes:
      # the Contiamo.tenantId should be empty for localdev
      - ./config/sync-ingester/config:/app/packages/ingester/config

  sync-agent-tableau:
    image: ${SYNC_AGENT_TABLEAU_IMAGE:-eu.gcr.io/dev-and-test-env/sync-agent-tableau:dev}
    environment:
      LOG_LEVEL: debug
      WORKERS: "1"
      JAEGER_DISABLED: "false"
      JAEGER_AGENT_HOST: tracing
    volumes:
      - ./config/auth:/config/auth
