| version: '3.8' |
|
|
| |
| |
| |
| |
|
|
| services: |
| |
| |
| zookeeper: |
| image: confluentinc/cp-zookeeper:7.5.0 |
| hostname: zookeeper |
| container_name: zookeeper |
| ports: |
| - "2181:2181" |
| environment: |
| ZOOKEEPER_CLIENT_PORT: 2181 |
| ZOOKEEPER_TICK_TIME: 2000 |
| volumes: |
| - zookeeper-data:/var/lib/zookeeper/data |
| healthcheck: |
| test: echo ruok | nc localhost 2181 | grep imok |
| interval: 10s |
| timeout: 5s |
| retries: 5 |
| networks: |
| - agentic-bi |
|
|
| kafka: |
| image: confluentinc/cp-kafka:7.5.0 |
| hostname: kafka |
| container_name: kafka |
| depends_on: |
| zookeeper: |
| condition: service_healthy |
| ports: |
| - "9092:9092" |
| - "29092:29092" |
| environment: |
| KAFKA_BROKER_ID: 1 |
| KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181' |
| KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT |
| KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092 |
| KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 |
| KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1 |
| KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1 |
| KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0 |
| KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true' |
| KAFKA_LOG_RETENTION_HOURS: 168 |
| KAFKA_MESSAGE_MAX_BYTES: 10485760 |
| volumes: |
| - kafka-data:/var/lib/kafka/data |
| healthcheck: |
| test: kafka-broker-api-versions --bootstrap-server kafka:29092 |
| interval: 10s |
| timeout: 10s |
| retries: 10 |
| networks: |
| - agentic-bi |
|
|
| schema-registry: |
| image: confluentinc/cp-schema-registry:7.5.0 |
| hostname: schema-registry |
| container_name: schema-registry |
| depends_on: |
| kafka: |
| condition: service_healthy |
| ports: |
| - "8081:8081" |
| environment: |
| SCHEMA_REGISTRY_HOST_NAME: schema-registry |
| SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'kafka:29092' |
| SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081 |
| healthcheck: |
| test: curl -f http://localhost:8081/subjects || exit 1 |
| interval: 10s |
| timeout: 5s |
| retries: 5 |
| networks: |
| - agentic-bi |
|
|
| |
| |
| kafka-ui: |
| image: provectuslabs/kafka-ui:latest |
| container_name: kafka-ui |
| depends_on: |
| kafka: |
| condition: service_healthy |
| ports: |
| - "8080:8080" |
| environment: |
| KAFKA_CLUSTERS_0_NAME: local |
| KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:29092 |
| KAFKA_CLUSTERS_0_SCHEMAREGISTRY: http://schema-registry:8081 |
| networks: |
| - agentic-bi |
|
|
| |
|
|
| minio: |
| image: minio/minio:latest |
| hostname: minio |
| container_name: minio |
| ports: |
| - "9000:9000" |
| - "9001:9001" |
| environment: |
| MINIO_ROOT_USER: minioadmin |
| MINIO_ROOT_PASSWORD: minioadmin123 |
| command: server /data --console-address ":9001" |
| volumes: |
| - minio-data:/data |
| healthcheck: |
| test: ["CMD", "mc", "ready", "local"] |
| interval: 10s |
| timeout: 5s |
| retries: 5 |
| networks: |
| - agentic-bi |
|
|
| minio-setup: |
| image: minio/mc:latest |
| container_name: minio-setup |
| depends_on: |
| minio: |
| condition: service_healthy |
| entrypoint: > |
| /bin/sh -c " |
| mc alias set myminio http://minio:9000 minioadmin minioadmin123; |
| mc mb myminio/bronze --ignore-existing; |
| mc mb myminio/silver --ignore-existing; |
| mc mb myminio/gold --ignore-existing; |
| mc mb myminio/checkpoints --ignore-existing; |
| echo 'MinIO buckets created!'; |
| " |
| networks: |
| - agentic-bi |
|
|
| |
|
|
| postgresql: |
| image: postgres:16 |
| hostname: postgresql |
| container_name: postgresql |
| ports: |
| - "5432:5432" |
| environment: |
| POSTGRES_DB: ecommerce_dw |
| POSTGRES_USER: dw_user |
| POSTGRES_PASSWORD: dw_password |
| POSTGRES_MULTIPLE_DATABASES: ecommerce_dw,airflow_db |
| volumes: |
| - postgres-data:/var/lib/postgresql/data |
| - ./init-scripts/postgres:/docker-entrypoint-initdb.d |
| healthcheck: |
| test: pg_isready -U dw_user -d ecommerce_dw |
| interval: 10s |
| timeout: 5s |
| retries: 5 |
| networks: |
| - agentic-bi |
|
|
| clickhouse: |
| image: clickhouse/clickhouse-server:24 |
| hostname: clickhouse |
| container_name: clickhouse |
| ports: |
| - "8123:8123" |
| - "9002:9000" |
| environment: |
| CLICKHOUSE_DB: ecommerce_realtime |
| CLICKHOUSE_USER: ch_user |
| CLICKHOUSE_PASSWORD: ch_password |
| volumes: |
| - clickhouse-data:/var/lib/clickhouse |
| - ./init-scripts/clickhouse:/docker-entrypoint-initdb.d |
| healthcheck: |
| test: wget --no-verbose --tries=1 --spider http://localhost:8123/ping || exit 1 |
| interval: 10s |
| timeout: 5s |
| retries: 5 |
| networks: |
| - agentic-bi |
|
|
| |
|
|
| chromadb: |
| image: chromadb/chroma:latest |
| hostname: chromadb |
| container_name: chromadb |
| ports: |
| - "8000:8000" |
| volumes: |
| - chroma-data:/chroma/chroma |
| environment: |
| IS_PERSISTENT: TRUE |
| ANONYMIZED_TELEMETRY: FALSE |
| networks: |
| - agentic-bi |
|
|
| |
|
|
| spark-master: |
| image: bitnami/spark:3.5 |
| hostname: spark-master |
| container_name: spark-master |
| ports: |
| - "8085:8080" |
| - "7077:7077" |
| environment: |
| SPARK_MODE: master |
| SPARK_MASTER_HOST: spark-master |
| SPARK_MASTER_PORT: 7077 |
| volumes: |
| - ./spark_jobs:/opt/spark-jobs |
| - ./data:/opt/data |
| networks: |
| - agentic-bi |
|
|
| spark-worker: |
| image: bitnami/spark:3.5 |
| hostname: spark-worker |
| container_name: spark-worker |
| depends_on: |
| - spark-master |
| environment: |
| SPARK_MODE: worker |
| SPARK_MASTER_URL: spark://spark-master:7077 |
| SPARK_WORKER_MEMORY: 2G |
| SPARK_WORKER_CORES: 2 |
| volumes: |
| - ./spark_jobs:/opt/spark-jobs |
| - ./data:/opt/data |
| networks: |
| - agentic-bi |
|
|
| |
|
|
| airflow-webserver: |
| image: apache/airflow:2.8.0-python3.11 |
| hostname: airflow-webserver |
| container_name: airflow-webserver |
| depends_on: |
| postgresql: |
| condition: service_healthy |
| ports: |
| - "8082:8080" |
| environment: |
| AIRFLOW__CORE__EXECUTOR: LocalExecutor |
| AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql+psycopg2://dw_user:dw_password@postgresql:5432/airflow_db |
| AIRFLOW__CORE__FERNET_KEY: 'ZmDfcTF7_60GrrY167zsiPd67pEvs0aGOv2oasOM1Pg=' |
| AIRFLOW__CORE__LOAD_EXAMPLES: 'false' |
| AIRFLOW__WEBSERVER__SECRET_KEY: 'agentic-bi-secret-key' |
| _AIRFLOW_DB_MIGRATE: 'true' |
| _AIRFLOW_WWW_USER_CREATE: 'true' |
| _AIRFLOW_WWW_USER_USERNAME: admin |
| _AIRFLOW_WWW_USER_PASSWORD: admin |
| volumes: |
| - ./airflow_dags:/opt/airflow/dags |
| - airflow-logs:/opt/airflow/logs |
| command: > |
| bash -c " |
| airflow db migrate && |
| airflow users create --username admin --password admin --firstname Admin --lastname User --role Admin --email admin@example.com || true && |
| airflow webserver |
| " |
| networks: |
| - agentic-bi |
|
|
| airflow-scheduler: |
| image: apache/airflow:2.8.0-python3.11 |
| hostname: airflow-scheduler |
| container_name: airflow-scheduler |
| depends_on: |
| - airflow-webserver |
| environment: |
| AIRFLOW__CORE__EXECUTOR: LocalExecutor |
| AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql+psycopg2://dw_user:dw_password@postgresql:5432/airflow_db |
| AIRFLOW__CORE__FERNET_KEY: 'ZmDfcTF7_60GrrY167zsiPd67pEvs0aGOv2oasOM1Pg=' |
| volumes: |
| - ./airflow_dags:/opt/airflow/dags |
| - airflow-logs:/opt/airflow/logs |
| command: airflow scheduler |
| networks: |
| - agentic-bi |
|
|
| |
|
|
| prometheus: |
| image: prom/prometheus:latest |
| hostname: prometheus |
| container_name: prometheus |
| ports: |
| - "9090:9090" |
| volumes: |
| - ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml |
| - prometheus-data:/prometheus |
| networks: |
| - agentic-bi |
|
|
| grafana: |
| image: grafana/grafana:10.0.0 |
| hostname: grafana |
| container_name: grafana |
| depends_on: |
| - prometheus |
| ports: |
| - "3000:3000" |
| environment: |
| GF_SECURITY_ADMIN_USER: admin |
| GF_SECURITY_ADMIN_PASSWORD: admin |
| GF_INSTALL_PLUGINS: grafana-clock-panel,grafana-simple-json-datasource |
| volumes: |
| - grafana-data:/var/lib/grafana |
| - ./monitoring/grafana/dashboards:/etc/grafana/provisioning/dashboards |
| - ./monitoring/grafana/datasources:/etc/grafana/provisioning/datasources |
| networks: |
| - agentic-bi |
|
|
| |
|
|
| agentic-bi-app: |
| build: |
| context: . |
| dockerfile: Dockerfile |
| hostname: agentic-bi-app |
| container_name: agentic-bi-app |
| depends_on: |
| postgresql: |
| condition: service_healthy |
| clickhouse: |
| condition: service_healthy |
| kafka: |
| condition: service_healthy |
| ports: |
| - "8501:8501" |
| environment: |
| |
| POSTGRES_HOST: postgresql |
| POSTGRES_PORT: 5432 |
| POSTGRES_DB: ecommerce_dw |
| POSTGRES_USER: dw_user |
| POSTGRES_PASSWORD: dw_password |
| CLICKHOUSE_HOST: clickhouse |
| CLICKHOUSE_PORT: 8123 |
| CLICKHOUSE_DB: ecommerce_realtime |
| CLICKHOUSE_USER: ch_user |
| CLICKHOUSE_PASSWORD: ch_password |
| |
| KAFKA_BOOTSTRAP_SERVERS: kafka:29092 |
| SCHEMA_REGISTRY_URL: http://schema-registry:8081 |
| |
| CHROMA_HOST: chromadb |
| CHROMA_PORT: 8000 |
| |
| HF_TOKEN: ${HF_TOKEN} |
| LLM_MODEL: Qwen/Qwen3-32B-Instruct |
| volumes: |
| - ./agentic_bi:/app/agentic_bi |
| - ./frontend:/app/frontend |
| - ./data:/app/data |
| networks: |
| - agentic-bi |
|
|
| |
|
|
| streaming-simulator: |
| build: |
| context: . |
| dockerfile: Dockerfile.simulator |
| hostname: streaming-simulator |
| container_name: streaming-simulator |
| depends_on: |
| kafka: |
| condition: service_healthy |
| schema-registry: |
| condition: service_healthy |
| environment: |
| KAFKA_BOOTSTRAP_SERVERS: kafka:29092 |
| SCHEMA_REGISTRY_URL: http://schema-registry:8081 |
| SPEED_FACTOR: 1000 |
| DATA_DIR: /app/data |
| volumes: |
| - ./streaming_simulator:/app/streaming_simulator |
| - ./data:/app/data |
| networks: |
| - agentic-bi |
|
|
| |
|
|
| volumes: |
| zookeeper-data: |
| kafka-data: |
| minio-data: |
| postgres-data: |
| clickhouse-data: |
| chroma-data: |
| airflow-logs: |
| prometheus-data: |
| grafana-data: |
|
|
| |
|
|
| networks: |
| agentic-bi: |
| driver: bridge |
| name: agentic-bi-network |
|
|