name: adapter-observer

services:
  adapter-observer:
    build:
      context: ${ADAPTER_OBSERVER_BUILD_CONTEXT:-../../../../plugins/1c/observer}
      dockerfile: Dockerfile
    image: ${ADAPTER_OBSERVER_IMAGE:-adapter-observer:latest}
    container_name: ${ADAPTER_OBSERVER_CONTAINER_NAME:-adapter-observer}
    restart: unless-stopped
    ports:
      - "${ADAPTER_OBSERVER_HOST_PORT:-8031}:8031"
    volumes:
      - adapter-1c-data:/audit:ro
      - adapter-1c-mcp-data:/mcp-audit:ro
      - adapter-observer-state:/state
    environment:
      ONEC_OBSERVER_HOST: 0.0.0.0
      ONEC_OBSERVER_PORT: 8031
      ONEC_OBSERVER_AUDIT_DIR: /audit
      ONEC_OBSERVER_MCP_AUDIT_DIR: /mcp-audit
      ONEC_OBSERVER_STATE_DIR: /state
      ONEC_OBSERVER_ADAPTER_URL: ${ONEC_OBSERVER_ADAPTER_URL:-http://adapter-1c-rest:8011}
      ONEC_OBSERVER_COVERAGE_BASE_ID: ${ONEC_OBSERVER_COVERAGE_BASE_ID:-upo_test}
      ONEC_OBSERVER_COVERAGE_INTERVAL_SECONDS: ${ONEC_OBSERVER_COVERAGE_INTERVAL_SECONDS:-900}
    networks:
      - default
      - adapter-1c

volumes:
  adapter-1c-data:
    external: true
    name: ${ADAPTER_OBSERVER_AUDIT_VOLUME:-adapter-1c_adapter-1c-data}
  adapter-1c-mcp-data:
    external: true
    name: ${ADAPTER_OBSERVER_MCP_AUDIT_VOLUME:-adapter-1c-mcp_adapter-1c-mcp-data}
  adapter-observer-state:

networks:
  adapter-1c:
    external: true
    name: ${ADAPTER_OBSERVER_ADAPTER_NETWORK:-adapter-1c_default}
