mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-07 07:55:16 +02:00
209 lines
4.9 KiB
YAML
209 lines
4.9 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:17
|
|
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
|
|
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
|
|
|
|
api:
|
|
image: chewieee/dograh-api:v7
|
|
volumes:
|
|
- shared-tmp:/tmp
|
|
environment:
|
|
# Core application config
|
|
ENVIRONMENT: "local"
|
|
LOG_LEVEL: "INFO"
|
|
|
|
# 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"
|
|
MINIO_ACCESS_KEY: "minioadmin"
|
|
MINIO_SECRET_KEY: "minioadmin"
|
|
MINIO_BUCKET: "voice-audio"
|
|
MINIO_SECURE: "false"
|
|
|
|
MPS_API_URL: "https://dograh.a.pinggy.link"
|
|
|
|
# Langfuse
|
|
ENABLE_TRACING: "false"
|
|
# LANGFUSE_SECRET_KEY: ""
|
|
# LANGFUSE_PUBLIC_KEY: ""
|
|
# LANGFUSE_HOST: "https://langfuse.dograh.com"
|
|
|
|
# Sentry
|
|
ENABLE_SETRY: "false"
|
|
SENTRY_DSN: ""
|
|
|
|
ports:
|
|
- "8000:8000"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
command: >
|
|
bash -c "
|
|
cd /app/api &&
|
|
alembic upgrade head &&
|
|
uvicorn api.app:app --host 0.0.0.0 --port 8000
|
|
"
|
|
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
|
|
|
|
arq-worker:
|
|
image: chewieee/dograh-api:v7
|
|
volumes:
|
|
- shared-tmp:/tmp
|
|
environment:
|
|
# Core application config
|
|
ENVIRONMENT: "local"
|
|
LOG_LEVEL: "INFO"
|
|
|
|
# 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"
|
|
MINIO_ACCESS_KEY: "minioadmin"
|
|
MINIO_SECRET_KEY: "minioadmin"
|
|
MINIO_BUCKET: "voice-audio"
|
|
MINIO_SECURE: "false"
|
|
|
|
# Sentry
|
|
ENABLE_SETRY: "false"
|
|
SENTRY_DSN: ""
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- app-network
|
|
|
|
ui:
|
|
image: chewieee/dograh-ui:v10
|
|
environment:
|
|
NEXT_PUBLIC_NODE_ENV: "local"
|
|
NEXT_PUBLIC_AUTH_PROVIDER: "local"
|
|
# Client-side URL (from browser)
|
|
NEXT_PUBLIC_BACKEND_URL: "http://localhost:8000"
|
|
# Server-side URL (SSR, internal Docker network)
|
|
BACKEND_URL: "http://api:8000"
|
|
|
|
# Controls some feature flags like voicemail detection
|
|
NEXT_PUBLIC_DEPLOYMENT_MODE: "oss"
|
|
|
|
# Posthog
|
|
NEXT_PUBLIC_ENABLE_POSTHOG: "true"
|
|
NEXT_PUBLIC_POSTHOG_KEY: "phc_st6dverimoydkpM5m0a9aeAr8znUYWznEaQa8v80E2D"
|
|
|
|
# Sentry
|
|
NEXT_PUBLIC_ENABLE_SENTRY: "false"
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
api:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"wget --no-verbose --tries=1 --spider http://localhost:3000 || exit 1",
|
|
]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 30s
|
|
networks:
|
|
- app-network
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
minio-data:
|
|
driver: local
|
|
shared-tmp:
|
|
driver: local
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|