@clduab11/gemini-flow
Version:
Revolutionary AI agent swarm coordination platform with Google Services integration, multimedia processing, and production-ready monitoring. Features 8 Google AI services, quantum computing capabilities, and enterprise-grade security.
383 lines (352 loc) • 8.97 kB
YAML
version: '3.8'
# Docker Compose Configuration for Google Services Integration Testing
#
# This configuration provides a comprehensive test environment with:
# - Mock Google Cloud services
# - Network simulation capabilities
# - Monitoring and metrics collection
# - Database and storage services
# - Load testing infrastructure
services:
# === Mock Google Cloud Services ===
mock-vertex-ai:
image: wiremock/wiremock:3.0.0
container_name: mock-vertex-ai
ports:
- "8080:8080"
volumes:
- ./wiremock/vertex-ai:/home/wiremock
command:
- --global-response-templating
- --enable-stub-cors
environment:
- JAVA_OPTS=-Xmx512m
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/__admin/health"]
interval: 10s
timeout: 5s
retries: 5
networks:
- test-network
mock-streaming-api:
image: nginx:alpine
container_name: mock-streaming-api
ports:
- "8081:80"
volumes:
- ./nginx/streaming-api.conf:/etc/nginx/nginx.conf:ro
- ./mock-data/streams:/usr/share/nginx/html/streams:ro
depends_on:
- redis
networks:
- test-network
mock-veo3:
build:
context: ./mock-services/veo3
dockerfile: Dockerfile
container_name: mock-veo3
ports:
- "8082:3000"
environment:
- NODE_ENV=test
- GENERATION_DELAY=2000
- QUALITY_PROFILES=low,medium,high
volumes:
- ./mock-data/videos:/app/videos:ro
- test-videos:/app/output
networks:
- test-network
mock-imagen4:
build:
context: ./mock-services/imagen4
dockerfile: Dockerfile
container_name: mock-imagen4
ports:
- "8083:3000"
environment:
- NODE_ENV=test
- GENERATION_DELAY=1000
- IMAGE_FORMATS=png,jpg,webp
volumes:
- ./mock-data/images:/app/images:ro
- test-images:/app/output
networks:
- test-network
mock-chirp:
build:
context: ./mock-services/chirp
dockerfile: Dockerfile
container_name: mock-chirp
ports:
- "8084:3000"
environment:
- NODE_ENV=test
- VOICES=professional,conversational,narrator
- LANGUAGES=en-US,en-GB,es-ES
volumes:
- ./mock-data/audio:/app/audio:ro
- test-audio:/app/output
networks:
- test-network
mock-lyria:
build:
context: ./mock-services/lyria
dockerfile: Dockerfile
container_name: mock-lyria
ports:
- "8085:3000"
environment:
- NODE_ENV=test
- STYLES=cinematic,corporate,uplifting,dramatic
- INSTRUMENTS=piano,strings,brass,percussion
volumes:
- ./mock-data/music:/app/music:ro
- test-music:/app/output
networks:
- test-network
# === Network Simulation ===
network-simulator:
build:
context: ./network-simulator
dockerfile: Dockerfile
container_name: network-simulator
ports:
- "9090:9090"
environment:
- PROFILES=ideal,degraded,poor,mobile,satellite
- API_PORT=9090
cap_add:
- NET_ADMIN
privileged: true
networks:
- test-network
# === Database Services ===
postgres:
image: postgres:15-alpine
container_name: test-postgres
ports:
- "5432:5432"
environment:
- POSTGRES_DB=gemini_flow_test
- POSTGRES_USER=test_user
- POSTGRES_PASSWORD=test_password
volumes:
- postgres-data:/var/lib/postgresql/data
- ./sql/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U test_user -d gemini_flow_test"]
interval: 10s
timeout: 5s
retries: 5
networks:
- test-network
redis:
image: redis:7-alpine
container_name: test-redis
ports:
- "6379:6379"
command: redis-server --appendonly yes
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- test-network
# === Monitoring and Metrics ===
prometheus:
image: prom/prometheus:v2.40.0
container_name: test-prometheus
ports:
- "9091:9090"
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention.time=1h'
- '--web.enable-lifecycle'
networks:
- test-network
grafana:
image: grafana/grafana:9.3.0
container_name: test-grafana
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
- grafana-data:/var/lib/grafana
- ./grafana/dashboards:/etc/grafana/provisioning/dashboards:ro
- ./grafana/datasources:/etc/grafana/provisioning/datasources:ro
depends_on:
- prometheus
networks:
- test-network
jaeger:
image: jaegertracing/all-in-one:1.40
container_name: test-jaeger
ports:
- "16686:16686"
- "14268:14268"
environment:
- COLLECTOR_OTLP_ENABLED=true
volumes:
- jaeger-data:/tmp
networks:
- test-network
# === Load Testing ===
k6:
image: grafana/k6:0.42.0
container_name: test-k6
volumes:
- ./k6/scripts:/scripts:ro
- ./k6/results:/results
environment:
- K6_PROMETHEUS_RW_SERVER_URL=http://prometheus:9090/api/v1/write
- K6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM=true
depends_on:
- mock-vertex-ai
- mock-streaming-api
- prometheus
networks:
- test-network
profiles:
- load-testing
artillery:
build:
context: ./artillery
dockerfile: Dockerfile
container_name: test-artillery
volumes:
- ./artillery/configs:/configs:ro
- ./artillery/results:/results
depends_on:
- mock-vertex-ai
- mock-streaming-api
networks:
- test-network
profiles:
- load-testing
# === File Storage ===
minio:
image: minio/minio:RELEASE.2023-01-25T00-19-54Z
container_name: test-minio
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
- MINIO_REGION_NAME=us-east-1
volumes:
- minio-data:/data
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
networks:
- test-network
# === Test Orchestrator ===
test-orchestrator:
build:
context: ./test-orchestrator
dockerfile: Dockerfile
container_name: test-orchestrator
ports:
- "8000:8000"
environment:
- NODE_ENV=test
- TEST_TIMEOUT=300000
- PARALLEL_TESTS=4
volumes:
- ./test-results:/app/results
- /var/run/docker.sock:/var/run/docker.sock:ro
depends_on:
- postgres
- redis
- mock-vertex-ai
- mock-streaming-api
- prometheus
networks:
- test-network
profiles:
- orchestration
# === Selenium Grid for Browser Testing ===
selenium-hub:
image: selenium/hub:4.15.0
container_name: selenium-hub
ports:
- "4442:4442"
- "4443:4443"
- "4444:4444"
environment:
- SE_OPTS="--log-level INFO"
networks:
- test-network
selenium-chrome:
image: selenium/node-chrome:4.15.0
container_name: selenium-chrome
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_NODE_MAX_INSTANCES=2
- SE_NODE_MAX_SESSIONS=2
depends_on:
- selenium-hub
networks:
- test-network
profiles:
- browser-testing
selenium-firefox:
image: selenium/node-firefox:4.15.0
container_name: selenium-firefox
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_NODE_MAX_INSTANCES=1
- SE_NODE_MAX_SESSIONS=1
depends_on:
- selenium-hub
networks:
- test-network
profiles:
- browser-testing
volumes:
postgres-data:
driver: local
redis-data:
driver: local
prometheus-data:
driver: local
grafana-data:
driver: local
jaeger-data:
driver: local
minio-data:
driver: local
test-videos:
driver: local
test-images:
driver: local
test-audio:
driver: local
test-music:
driver: local
networks:
test-network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16