File size: 2,184 Bytes
19dfd32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: '3.8'

services:
  # Main Agentic Application (worker :8700, MCP tool server :8701, web UI :7860)
  demo-agent-app:
    build: .
    container_name: demo-agent-app
    restart: unless-stopped
    env_file: Agent/.env
    environment:
      - OLLAMA_BASE_URL=http://172.27.224.1:11434
      - LLM_CTX=4096
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 4G
    ports:
      - "7860:7860"   # Web UI (QueryLens)
      - "8700:8700"   # Worker API
      - "8701:8701"   # MCP tool server
    depends_on:
      demo-postgres:
        condition: service_healthy
      demo-mysql:
        condition: service_healthy
    volumes:
      - ./Agent:/app/Agent
      - ./web:/app/web
      # Dynamic database profiles: uploaded schema files + profile registry
      - demo-schema-uploads:/app/uploads/schemas
      - demo-chat-store:/app/chat_store
    networks:
      - demo-net

  # MySQL Sample Database (built-in employee demo)
  demo-mysql:
    image: mysql:8.0
    container_name: demo-mysql
    restart: unless-stopped
    env_file: Agent/.env
    ports:
      - "${MYSQL_PORT:-3306}:3306"
    volumes:
      - ./employee-sample-database/mysql/dataset_small:/docker-entrypoint-initdb.d
      - demo-mysql-data:/var/lib/mysql
    networks:
      - demo-net
    healthcheck:
      test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "--silent"]
      interval: 5s
      timeout: 5s
      retries: 12
      start_period: 30s

  # PostgreSQL Sample Database (built-in employee demo)
  demo-postgres:
    image: postgres:15
    container_name: demo-postgres
    restart: unless-stopped
    env_file: Agent/.env
    ports:
      - "${POSTGRES_PORT:-5432}:5432"
    volumes:
      - ./employee-sample-database/postgres/dataset_small:/docker-entrypoint-initdb.d
      - demo-postgres-data:/var/lib/postgresql/data
    networks:
      - demo-net
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER:-postgres}"]
      interval: 5s
      timeout: 5s
      retries: 12
      start_period: 30s

volumes:
  demo-mysql-data:
  demo-postgres-data:
  demo-schema-uploads:
  demo-chat-store:

networks:
  demo-net:
    driver: bridge