Files
noteflow/docker-compose.prod.yml

170 lines
4.3 KiB
YAML

services:
db:
container_name: noteflow-postgres
image: pgvector/pgvector:pg15
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-noteflow}
POSTGRES_USER: ${POSTGRES_USER:-noteflow}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-noteflow}
volumes:
- noteflow_pg_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-noteflow} -d ${POSTGRES_DB:-noteflow}"]
interval: 5s
timeout: 5s
retries: 10
networks:
- noteflow-net
redis:
container_name: noteflow-redis
image: redis:7-alpine
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- noteflow_redis_data:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
networks:
- noteflow-net
qdrant:
container_name: noteflow-qdrant
image: qdrant/qdrant:v1.12.1
restart: unless-stopped
ports:
- "6333:6333"
- "6334:6334"
volumes:
- noteflow_qdrant_data:/qdrant/storage
environment:
QDRANT__SERVICE__GRPC_PORT: 6334
healthcheck:
test: ["CMD-SHELL", "bash -c '</dev/tcp/localhost/6333'"]
interval: 5s
timeout: 3s
retries: 10
start_period: 10s
networks:
- noteflow-net
server:
container_name: noteflow-server
image: git.baked.rocks/vasceannie/noteflow:latest
restart: unless-stopped
ports:
- "50051:50051"
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- .env
environment:
NOTEFLOW_DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-noteflow}:${POSTGRES_PASSWORD:-noteflow}@db:5432/${POSTGRES_DB:-noteflow}
NOTEFLOW_REDIS_URL: redis://redis:6379/0
NOTEFLOW_QDRANT_URL: http://qdrant:6333
NOTEFLOW_LOG_FORMAT: console
NOTEFLOW_ASR_DEVICE: cpu
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
qdrant:
condition: service_healthy
networks:
- noteflow-net
server-gpu:
container_name: noteflow-server
image: git.baked.rocks/vasceannie/noteflow:latest-gpu
restart: unless-stopped
ports:
- "50051:50051"
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- .env
environment:
NOTEFLOW_DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-noteflow}:${POSTGRES_PASSWORD:-noteflow}@db:5432/${POSTGRES_DB:-noteflow}
NOTEFLOW_REDIS_URL: redis://redis:6379/0
NOTEFLOW_QDRANT_URL: http://qdrant:6333
NOTEFLOW_LOG_FORMAT: console
NOTEFLOW_ASR_DEVICE: cuda
NOTEFLOW_DIARIZATION_DEVICE: cuda
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
qdrant:
condition: service_healthy
networks:
- noteflow-net
profiles:
- gpu
server-rocm:
container_name: noteflow-server
image: git.baked.rocks/vasceannie/noteflow:latest-rocm
restart: unless-stopped
ports:
- "50051:50051"
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- .env
environment:
NOTEFLOW_DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-noteflow}:${POSTGRES_PASSWORD:-noteflow}@db:5432/${POSTGRES_DB:-noteflow}
NOTEFLOW_REDIS_URL: redis://redis:6379/0
NOTEFLOW_QDRANT_URL: http://qdrant:6333
NOTEFLOW_LOG_FORMAT: console
NOTEFLOW_ASR_DEVICE: rocm
NOTEFLOW_DIARIZATION_DEVICE: auto
NOTEFLOW_FEATURE_ROCM_ENABLED: "true"
devices:
- /dev/kfd
- /dev/dri
group_add:
- ${VIDEO_GID:-44}
- ${RENDER_GID:-993}
security_opt:
- seccomp=unconfined
ulimits:
memlock: -1
stack: 67108864
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
qdrant:
condition: service_healthy
networks:
- noteflow-net
profiles:
- rocm
volumes:
noteflow_pg_data:
noteflow_redis_data:
noteflow_qdrant_data:
networks:
noteflow-net:
driver: bridge