2025-09-09 14:37:32 +05:30
|
|
|
services:
|
|
|
|
|
postgres:
|
2026-01-23 18:53:59 +05:30
|
|
|
image: pgvector/pgvector:pg17
|
2025-09-09 14:37:32 +05:30
|
|
|
environment:
|
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
|
POSTGRES_DB: postgres
|
|
|
|
|
logging:
|
|
|
|
|
driver: "json-file"
|
|
|
|
|
options:
|
|
|
|
|
max-size: "10m"
|
|
|
|
|
max-file: "3"
|
|
|
|
|
ports:
|
|
|
|
|
- "5432:5432"
|
|
|
|
|
volumes:
|
|
|
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
|
|
|
interval: 3s
|
|
|
|
|
timeout: 3s
|
|
|
|
|
retries: 10
|
|
|
|
|
networks:
|
|
|
|
|
- app-network
|
|
|
|
|
|
|
|
|
|
redis:
|
|
|
|
|
image: redis:7
|
|
|
|
|
ports:
|
|
|
|
|
- "6379:6379"
|
|
|
|
|
command: >
|
|
|
|
|
--requirepass redissecret
|
|
|
|
|
volumes:
|
|
|
|
|
- redis_data:/data
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "redis-cli", "-a", "redissecret", "ping"]
|
|
|
|
|
interval: 3s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
retries: 10
|
|
|
|
|
networks:
|
|
|
|
|
- app-network
|
|
|
|
|
|
|
|
|
|
minio:
|
|
|
|
|
image: minio/minio
|
|
|
|
|
container_name: minio
|
|
|
|
|
command: server /data --console-address ":9001"
|
|
|
|
|
environment:
|
|
|
|
|
MINIO_ROOT_USER: minioadmin
|
|
|
|
|
MINIO_ROOT_PASSWORD: minioadmin
|
2025-10-09 17:54:31 +05:30
|
|
|
MINIO_API_CORS_ALLOW_ORIGIN: "*"
|
2025-09-09 14:37:32 +05:30
|
|
|
ports:
|
|
|
|
|
- "127.0.0.1:9000:9000" # Bind to localhost explicitly
|
|
|
|
|
- "127.0.0.1:9001:9001"
|
|
|
|
|
volumes:
|
|
|
|
|
- minio-data:/data
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
networks:
|
|
|
|
|
- app-network
|
|
|
|
|
|
2025-11-20 21:33:05 +05:30
|
|
|
nginx:
|
|
|
|
|
image: nginx:alpine
|
|
|
|
|
container_name: nginx_https
|
|
|
|
|
profiles: ["remote"]
|
|
|
|
|
depends_on:
|
|
|
|
|
- ui
|
|
|
|
|
ports:
|
|
|
|
|
- "80:80"
|
|
|
|
|
- "443:443"
|
|
|
|
|
volumes:
|
|
|
|
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
|
|
|
|
- ./certs:/etc/nginx/certs:ro
|
|
|
|
|
networks:
|
|
|
|
|
- app-network
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
api:
|
2025-10-04 12:23:20 +05:30
|
|
|
image: ${REGISTRY:-dograhai}/dograh-api:latest
|
2025-09-09 14:37:32 +05:30
|
|
|
volumes:
|
|
|
|
|
- shared-tmp:/tmp
|
|
|
|
|
environment:
|
|
|
|
|
# Core application config
|
|
|
|
|
ENVIRONMENT: "local"
|
|
|
|
|
LOG_LEVEL: "INFO"
|
|
|
|
|
|
2026-01-23 18:53:59 +05:30
|
|
|
# Replace this environment variable if you are using a custom
|
|
|
|
|
# domain to host the stack
|
2026-02-05 13:10:33 +05:30
|
|
|
BACKEND_API_ENDPOINT: "${BACKEND_API_ENDPOINT:-http://localhost:8000}"
|
2026-01-23 18:53:59 +05:30
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
# Database configuration (using containerized postgres)
|
|
|
|
|
DATABASE_URL: "postgresql+asyncpg://postgres:postgres@postgres:5432/postgres"
|
|
|
|
|
|
|
|
|
|
# Redis configuration (using containerized redis)
|
|
|
|
|
REDIS_URL: "redis://:redissecret@redis:6379"
|
|
|
|
|
|
|
|
|
|
# Storage configuration - using local MinIO
|
|
|
|
|
ENABLE_AWS_S3: "false"
|
|
|
|
|
|
|
|
|
|
# MinIO
|
|
|
|
|
MINIO_ENDPOINT: "minio:9000"
|
2026-04-16 13:03:29 +05:30
|
|
|
# Full URL (with scheme) browsers use to reach MinIO. For remote
|
|
|
|
|
# deployments behind HTTPS, set MINIO_PUBLIC_ENDPOINT in .env to
|
|
|
|
|
# e.g. https://your-server.example.com (nginx proxies /voice-audio/).
|
|
|
|
|
MINIO_PUBLIC_ENDPOINT: "${MINIO_PUBLIC_ENDPOINT:-http://localhost:9000}"
|
2025-09-09 14:37:32 +05:30
|
|
|
MINIO_ACCESS_KEY: "minioadmin"
|
|
|
|
|
MINIO_SECRET_KEY: "minioadmin"
|
|
|
|
|
MINIO_BUCKET: "voice-audio"
|
|
|
|
|
MINIO_SECURE: "false"
|
|
|
|
|
|
2026-02-20 18:21:24 +05:30
|
|
|
# FastAPI workers count
|
|
|
|
|
FASTAPI_WORKERS: 1
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
# Langfuse
|
|
|
|
|
ENABLE_TRACING: "false"
|
|
|
|
|
# LANGFUSE_SECRET_KEY: ""
|
|
|
|
|
# LANGFUSE_PUBLIC_KEY: ""
|
2026-02-25 13:53:30 +05:30
|
|
|
# LANGFUSE_HOST: ""
|
2025-09-09 14:37:32 +05:30
|
|
|
|
2025-12-22 13:29:41 +05:30
|
|
|
# TURN server configuration (for WebRTC NAT traversal in remote server)
|
2026-02-03 13:52:50 +05:30
|
|
|
# Uses time-limited credentials via TURN REST API (HMAC-SHA1)
|
2025-12-22 13:29:41 +05:30
|
|
|
TURN_HOST: "${TURN_HOST:-}"
|
2026-02-03 13:52:50 +05:30
|
|
|
TURN_SECRET: "${TURN_SECRET:-}"
|
2025-12-22 13:29:41 +05:30
|
|
|
|
2026-02-20 18:21:24 +05:30
|
|
|
OSS_JWT_SECRET: "${OSS_JWT_SECRET:-ChangeMeInProduction}"
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
ports:
|
|
|
|
|
- "8000:8000"
|
|
|
|
|
depends_on:
|
|
|
|
|
postgres:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
redis:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
minio:
|
|
|
|
|
condition: service_healthy
|
2025-10-04 12:22:50 +05:30
|
|
|
cloudflared:
|
|
|
|
|
condition: service_started
|
2025-09-09 14:37:32 +05:30
|
|
|
healthcheck:
|
|
|
|
|
test:
|
|
|
|
|
[
|
|
|
|
|
"CMD-SHELL",
|
|
|
|
|
'python -c "import urllib.request; urllib.request.urlopen(''http://localhost:8000/api/v1/health'').read()"',
|
|
|
|
|
]
|
|
|
|
|
interval: 30s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
retries: 3
|
|
|
|
|
start_period: 60s
|
|
|
|
|
networks:
|
|
|
|
|
- app-network
|
|
|
|
|
|
|
|
|
|
ui:
|
2025-09-24 21:42:39 +05:30
|
|
|
image: ${REGISTRY:-dograhai}/dograh-ui:latest
|
2025-09-09 14:37:32 +05:30
|
|
|
environment:
|
|
|
|
|
# Server-side URL (SSR, internal Docker network)
|
2026-02-20 19:26:41 +05:30
|
|
|
BACKEND_URL: "${BACKEND_URL:-http://api:8000}"
|
2025-10-04 12:23:20 +05:30
|
|
|
NODE_ENV: "oss"
|
2026-02-25 13:53:30 +05:30
|
|
|
# Flag to enable/ disable posthog
|
2025-10-04 15:05:07 +05:30
|
|
|
ENABLE_TELEMETRY: "${ENABLE_TELEMETRY:-true}"
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
# Posthog
|
2025-10-04 12:23:20 +05:30
|
|
|
POSTHOG_KEY: "phc_ItizB1dP6yv7ZYobbcqrpxTdbomDA8hJFSEmAMdYvIr"
|
|
|
|
|
POSTHOG_HOST: "https://us.posthog.com"
|
2025-09-09 14:37:32 +05:30
|
|
|
ports:
|
2025-10-04 15:05:07 +05:30
|
|
|
- "3010:3010"
|
2025-09-09 14:37:32 +05:30
|
|
|
depends_on:
|
|
|
|
|
api:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
healthcheck:
|
|
|
|
|
test:
|
|
|
|
|
[
|
|
|
|
|
"CMD-SHELL",
|
2025-10-04 15:05:07 +05:30
|
|
|
"wget --no-verbose --tries=1 --spider http://localhost:3010 || exit 1",
|
2025-09-09 14:37:32 +05:30
|
|
|
]
|
|
|
|
|
interval: 30s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
retries: 3
|
|
|
|
|
start_period: 30s
|
|
|
|
|
networks:
|
|
|
|
|
- app-network
|
|
|
|
|
|
2025-10-04 12:22:50 +05:30
|
|
|
cloudflared:
|
|
|
|
|
image: cloudflare/cloudflared:latest
|
|
|
|
|
container_name: cloudflared-tunnel
|
|
|
|
|
command: tunnel --no-autoupdate --url http://api:8000 --metrics 0.0.0.0:2000
|
|
|
|
|
ports:
|
|
|
|
|
- "2000:2000" # Expose metrics endpoint
|
|
|
|
|
networks:
|
|
|
|
|
- app-network
|
|
|
|
|
|
2025-12-22 13:29:41 +05:30
|
|
|
coturn:
|
2026-02-05 13:10:33 +05:30
|
|
|
image: coturn/coturn:4.8.0
|
2025-12-22 13:29:41 +05:30
|
|
|
container_name: coturn
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
profiles: ["remote"]
|
2026-02-03 13:52:50 +05:30
|
|
|
ports:
|
|
|
|
|
- "3478:3478/udp"
|
|
|
|
|
- "3478:3478/tcp"
|
|
|
|
|
- "5349:5349/udp"
|
|
|
|
|
- "5349:5349/tcp"
|
|
|
|
|
- "49152-49200:49152-49200/udp"
|
2026-02-05 13:10:33 +05:30
|
|
|
volumes:
|
|
|
|
|
- ./turnserver.conf:/etc/coturn/turnserver.conf:ro
|
|
|
|
|
command:
|
|
|
|
|
- -c
|
|
|
|
|
- /etc/coturn/turnserver.conf
|
2026-02-03 13:52:50 +05:30
|
|
|
networks:
|
|
|
|
|
- app-network
|
2025-12-22 13:29:41 +05:30
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
volumes:
|
|
|
|
|
postgres_data:
|
|
|
|
|
redis_data:
|
|
|
|
|
minio-data:
|
|
|
|
|
driver: local
|
|
|
|
|
shared-tmp:
|
|
|
|
|
driver: local
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
app-network:
|
2026-03-05 09:28:05 +05:30
|
|
|
driver: bridge
|