Files
AI-VideoAssistant/docker/docker-compose.yml
Xin Wang 530d95eea4 Enhance Docker configuration and update dependencies for Realtime Agent Studio
- Updated Dockerfile for the API to include build tools for C++11 required for native extensions.
- Revised requirements.txt to upgrade several dependencies, including FastAPI and SQLAlchemy.
- Expanded docker-compose.yml to add MinIO service for S3-compatible storage and improved health checks for backend and engine services.
- Enhanced README.md in the Docker directory to provide detailed service descriptions and quick start instructions.
- Updated mkdocs.yml to reflect new navigation structure and added deployment overview documentation.
- Introduced new Dockerfiles for the engine and web services, including development configurations for hot reloading.
2026-03-04 10:01:00 +08:00

122 lines
3.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Project name used as prefix for containers, volumes, and networks
name: ras
# Docker registry mirror for China users (change to empty or "docker.io" if you have direct access)
x-registry-mirror: &registry-mirror docker.1ms.run
services:
# MinIO (S3 compatible storage)
minio:
image: ${REGISTRY_MIRROR:-docker.1ms.run}/minio/minio
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio_data:/data
environment:
MINIO_ROOT_USER: admin
MINIO_ROOT_PASSWORD: password123
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 5
# Backend API
backend:
build:
context: ../api
dockerfile: Dockerfile
args:
REGISTRY_MIRROR: ${REGISTRY_MIRROR:-docker.1ms.run}
ports:
- "8100:8100"
environment:
- DATABASE_URL=sqlite:///./data/app.db
- MINIO_ENDPOINT=minio:9000
- MINIO_ACCESS_KEY=admin
- MINIO_SECRET_KEY=password123
- MINIO_BUCKET=ai-audio
volumes:
- backend_data:/app/data
depends_on:
minio:
condition: service_started
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8100/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
# Conversation Engine
engine:
build:
context: ../engine
dockerfile: Dockerfile
ports:
- "8001:8001"
environment:
- HOST=0.0.0.0
- PORT=8001
- BACKEND_MODE=http
- BACKEND_URL=http://backend:8100
- LOG_LEVEL=INFO
- CORS_ORIGINS=["http://localhost:6000","http://localhost:3000"]
volumes:
- ../engine/config:/app/config:ro
- ../engine/data:/app/data:ro
- engine_logs:/app/logs
depends_on:
backend:
condition: service_started
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8001/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
# Frontend (Vite + React) production: built static files served on 6000
frontend:
build:
context: ../web
dockerfile: Dockerfile
args:
REGISTRY_MIRROR: ${REGISTRY_MIRROR:-docker.1ms.run}
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-http://localhost:8100/api}
VITE_ENGINE_WS_URL: ${VITE_ENGINE_WS_URL:-ws://localhost:8001/ws}
ports:
- "6000:6000"
depends_on:
- backend
- engine
# Frontend dev hot reload on port 3000 (run with: docker compose --profile dev up)
frontend-dev:
profiles:
- dev
build:
context: ../web
dockerfile: Dockerfile.dev
args:
REGISTRY_MIRROR: ${REGISTRY_MIRROR:-docker.1ms.run}
ports:
- "3000:3000"
environment:
- VITE_API_BASE_URL=${VITE_API_BASE_URL:-http://localhost:8100/api}
- VITE_ENGINE_WS_URL=${VITE_ENGINE_WS_URL:-ws://localhost:8001/ws}
volumes:
- ../web:/app
- frontend_dev_node_modules:/app/node_modules
depends_on:
- backend
- engine
volumes:
minio_data:
backend_data:
engine_logs:
frontend_dev_node_modules: