224 lines
7.3 KiB
YAML
224 lines
7.3 KiB
YAML
services:
|
|
frontend:
|
|
image: node:22-bookworm-slim
|
|
working_dir: /app/Frontend
|
|
volumes:
|
|
# Mount only the app source; keep node_modules inside the container to avoid
|
|
# leaking absolute host paths into Nuxt/Nitro dev runtime.
|
|
- ./Frontend:/app/Frontend
|
|
- clientsflow_data:/app/.data
|
|
- frontend_node_modules:/app/Frontend/node_modules
|
|
- frontend_nuxt:/app/Frontend/.nuxt
|
|
- frontend_output:/app/Frontend/.output
|
|
expose:
|
|
- "3000"
|
|
environment:
|
|
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/clientsflow?schema=public"
|
|
REDIS_URL: "redis://redis:6379"
|
|
CF_AGENT_MODE: "langgraph"
|
|
OPENROUTER_API_KEY: "${OPENROUTER_API_KEY:-}"
|
|
OPENROUTER_BASE_URL: "https://openrouter.ai/api/v1"
|
|
OPENROUTER_MODEL: "openai/gpt-4o-mini"
|
|
OPENROUTER_HTTP_REFERER: "${OPENROUTER_HTTP_REFERER:-}"
|
|
OPENROUTER_X_TITLE: "clientsflow"
|
|
OPENROUTER_REASONING_ENABLED: "${OPENROUTER_REASONING_ENABLED:-0}"
|
|
CF_WHISPER_MODEL: "${CF_WHISPER_MODEL:-Xenova/whisper-small}"
|
|
CF_WHISPER_LANGUAGE: "${CF_WHISPER_LANGUAGE:-ru}"
|
|
LANGFUSE_ENABLED: "${LANGFUSE_ENABLED:-true}"
|
|
LANGFUSE_BASE_URL: "${LANGFUSE_BASE_URL:-http://langfuse-web:3000}"
|
|
LANGFUSE_PUBLIC_KEY: "${LANGFUSE_PUBLIC_KEY:-pk-lf-local}"
|
|
LANGFUSE_SECRET_KEY: "${LANGFUSE_SECRET_KEY:-sk-lf-local}"
|
|
# Set this in your shell or a compose override:
|
|
# OPENROUTER_API_KEY: "..."
|
|
# GIGACHAT_AUTH_KEY: "..." (if you use GigaChat integration)
|
|
command: >
|
|
bash -lc "
|
|
./scripts/compose-dev.sh
|
|
"
|
|
depends_on:
|
|
- redis
|
|
- postgres
|
|
- langfuse-web
|
|
|
|
delivery-worker:
|
|
image: node:22-bookworm-slim
|
|
working_dir: /app/Frontend
|
|
volumes:
|
|
- ./Frontend:/app/Frontend
|
|
- clientsflow_data:/app/.data
|
|
- delivery_node_modules:/app/Frontend/node_modules
|
|
environment:
|
|
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/clientsflow?schema=public"
|
|
REDIS_URL: "redis://redis:6379"
|
|
TELEGRAM_API_BASE: "${TELEGRAM_API_BASE:-https://api.telegram.org}"
|
|
TELEGRAM_BOT_TOKEN: "${TELEGRAM_BOT_TOKEN:-}"
|
|
command: >
|
|
bash -lc "
|
|
bash ./scripts/compose-worker.sh
|
|
"
|
|
depends_on:
|
|
- redis
|
|
- postgres
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
expose:
|
|
- "6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
expose:
|
|
- "5432"
|
|
environment:
|
|
POSTGRES_DB: "clientsflow"
|
|
POSTGRES_USER: "postgres"
|
|
POSTGRES_PASSWORD: "postgres"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
langfuse-worker:
|
|
image: docker.io/langfuse/langfuse-worker:3
|
|
restart: always
|
|
depends_on:
|
|
langfuse-postgres:
|
|
condition: service_healthy
|
|
langfuse-minio:
|
|
condition: service_healthy
|
|
langfuse-redis:
|
|
condition: service_healthy
|
|
langfuse-clickhouse:
|
|
condition: service_healthy
|
|
environment: &langfuse_env
|
|
NEXTAUTH_URL: "http://localhost:3001"
|
|
DATABASE_URL: "postgresql://langfuse:langfuse@langfuse-postgres:5432/langfuse"
|
|
SALT: "clientsflow-local-salt"
|
|
ENCRYPTION_KEY: "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
|
TELEMETRY_ENABLED: "false"
|
|
CLICKHOUSE_MIGRATION_URL: "clickhouse://langfuse-clickhouse:9000"
|
|
CLICKHOUSE_URL: "http://langfuse-clickhouse:8123"
|
|
CLICKHOUSE_USER: "clickhouse"
|
|
CLICKHOUSE_PASSWORD: "clickhouse"
|
|
CLICKHOUSE_CLUSTER_ENABLED: "false"
|
|
LANGFUSE_S3_EVENT_UPLOAD_BUCKET: "langfuse"
|
|
LANGFUSE_S3_EVENT_UPLOAD_REGION: "auto"
|
|
LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID: "minio"
|
|
LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY: "miniosecret"
|
|
LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT: "http://langfuse-minio:9000"
|
|
LANGFUSE_S3_EVENT_UPLOAD_FORCE_PATH_STYLE: "true"
|
|
LANGFUSE_S3_EVENT_UPLOAD_PREFIX: "events/"
|
|
LANGFUSE_S3_MEDIA_UPLOAD_BUCKET: "langfuse"
|
|
LANGFUSE_S3_MEDIA_UPLOAD_REGION: "auto"
|
|
LANGFUSE_S3_MEDIA_UPLOAD_ACCESS_KEY_ID: "minio"
|
|
LANGFUSE_S3_MEDIA_UPLOAD_SECRET_ACCESS_KEY: "miniosecret"
|
|
LANGFUSE_S3_MEDIA_UPLOAD_ENDPOINT: "http://langfuse-minio:9000"
|
|
LANGFUSE_S3_MEDIA_UPLOAD_FORCE_PATH_STYLE: "true"
|
|
LANGFUSE_S3_MEDIA_UPLOAD_PREFIX: "media/"
|
|
REDIS_HOST: "langfuse-redis"
|
|
REDIS_PORT: "6379"
|
|
REDIS_AUTH: "langfuse-redis"
|
|
REDIS_TLS_ENABLED: "false"
|
|
|
|
langfuse-web:
|
|
image: docker.io/langfuse/langfuse:3
|
|
restart: always
|
|
depends_on:
|
|
langfuse-postgres:
|
|
condition: service_healthy
|
|
langfuse-minio:
|
|
condition: service_healthy
|
|
langfuse-redis:
|
|
condition: service_healthy
|
|
langfuse-clickhouse:
|
|
condition: service_healthy
|
|
expose:
|
|
- "3000"
|
|
environment:
|
|
<<: *langfuse_env
|
|
NEXTAUTH_SECRET: "clientsflow-local-nextauth-secret"
|
|
LANGFUSE_INIT_ORG_ID: "org-clientsflow"
|
|
LANGFUSE_INIT_ORG_NAME: "Clientsflow Local"
|
|
LANGFUSE_INIT_PROJECT_ID: "proj-clientsflow"
|
|
LANGFUSE_INIT_PROJECT_NAME: "clientsflow"
|
|
LANGFUSE_INIT_PROJECT_PUBLIC_KEY: "pk-lf-local"
|
|
LANGFUSE_INIT_PROJECT_SECRET_KEY: "sk-lf-local"
|
|
LANGFUSE_INIT_USER_EMAIL: "admin@clientsflow.local"
|
|
LANGFUSE_INIT_USER_NAME: "Local Admin"
|
|
LANGFUSE_INIT_USER_PASSWORD: "clientsflow-local-admin"
|
|
|
|
langfuse-clickhouse:
|
|
image: docker.io/clickhouse/clickhouse-server:latest
|
|
restart: always
|
|
user: "101:101"
|
|
environment:
|
|
CLICKHOUSE_DB: "default"
|
|
CLICKHOUSE_USER: "clickhouse"
|
|
CLICKHOUSE_PASSWORD: "clickhouse"
|
|
volumes:
|
|
- langfuse_clickhouse_data:/var/lib/clickhouse
|
|
- langfuse_clickhouse_logs:/var/log/clickhouse-server
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8123/ping || exit 1"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
start_period: 5s
|
|
|
|
langfuse-minio:
|
|
image: cgr.dev/chainguard/minio:latest
|
|
restart: always
|
|
entrypoint: sh
|
|
command: -c 'mkdir -p /data/langfuse && minio server --address ":9000" --console-address ":9001" /data'
|
|
environment:
|
|
MINIO_ROOT_USER: "minio"
|
|
MINIO_ROOT_PASSWORD: "miniosecret"
|
|
volumes:
|
|
- langfuse_minio_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "mc", "ready", "local"]
|
|
interval: 2s
|
|
timeout: 5s
|
|
retries: 15
|
|
start_period: 5s
|
|
|
|
langfuse-redis:
|
|
image: docker.io/redis:7-alpine
|
|
restart: always
|
|
command: ["redis-server", "--requirepass", "langfuse-redis", "--maxmemory-policy", "noeviction"]
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "redis-cli -a langfuse-redis ping | grep PONG"]
|
|
interval: 3s
|
|
timeout: 5s
|
|
retries: 20
|
|
start_period: 5s
|
|
|
|
langfuse-postgres:
|
|
image: postgres:16-alpine
|
|
restart: always
|
|
environment:
|
|
POSTGRES_DB: "langfuse"
|
|
POSTGRES_USER: "langfuse"
|
|
POSTGRES_PASSWORD: "langfuse"
|
|
volumes:
|
|
- langfuse_postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U langfuse -d langfuse"]
|
|
interval: 3s
|
|
timeout: 3s
|
|
retries: 20
|
|
start_period: 5s
|
|
|
|
volumes:
|
|
clientsflow_data:
|
|
frontend_node_modules:
|
|
delivery_node_modules:
|
|
frontend_nuxt:
|
|
frontend_output:
|
|
redis_data:
|
|
postgres_data:
|
|
langfuse_postgres_data:
|
|
langfuse_clickhouse_data:
|
|
langfuse_clickhouse_logs:
|
|
langfuse_minio_data:
|