QueryLensV2b / docker-compose.yml
Aniruddha7's picture
Full deploy of QueryLensV2 (code + demo db) to a fresh Space
19dfd32 verified
Raw History Blame Contribute Delete
2.18 kB
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