# HomeAI Kit — Full Stack # Usage: # docker compose up -d # Core services only # docker compose --profile extras up -d # Core + optional services # docker compose down # Stop everything services: # ── Ollama (Local LLM Inference) ───────────────────────── ollama: image: ollama/ollama:latest container_name: homeai-ollama ports: - "${OLLAMA_PORT:-11434}:11434" volumes: - ollama_data:/root/.ollama healthcheck: test: ["CMD-SHELL", "bash -c 'echo > /dev/tcp/localhost/11434'"] interval: 10s timeout: 5s retries: 5 start_period: 15s restart: unless-stopped networks: - homeai-net # ── Open WebUI (Chat Interface) ────────────────────────── open-webui: image: ghcr.io/open-webui/open-webui:main container_name: homeai-open-webui ports: - "${WEBUI_PORT:-3000}:8080" environment: OLLAMA_BASE_URL: http://ollama:11434 WEBUI_AUTH: "true" volumes: - openwebui_data:/app/backend/data depends_on: ollama: condition: service_healthy restart: unless-stopped networks: - homeai-net # ── ChromaDB (Vector Database) ─────────────────────────── chromadb: image: chromadb/chroma:latest container_name: homeai-chromadb ports: - "127.0.0.1:${CHROMA_PORT:-8000}:8000" environment: IS_PERSISTENT: "true" ANONYMIZED_TELEMETRY: "false" CHROMA_SERVER_AUTHN_CREDENTIALS: ${CHROMA_SERVER_AUTHN_CREDENTIALS:-} CHROMA_SERVER_AUTHN_PROVIDER: ${CHROMA_SERVER_AUTHN_PROVIDER:-} volumes: - chromadb_data:/chroma/chroma healthcheck: test: ["CMD-SHELL", "bash -c 'echo > /dev/tcp/localhost/8000'"] interval: 10s timeout: 5s retries: 5 start_period: 15s restart: unless-stopped networks: - homeai-net # ── SearXNG (Private Meta-Search) ─────────────────────── searxng: image: searxng/searxng:latest container_name: homeai-searxng ports: - "${SEARXNG_PORT:-8080}:8080" volumes: - ./config/searxng/settings.yml:/etc/searxng/settings.yml:ro - ./config/searxng/limiter.toml:/etc/searxng/limiter.toml:ro healthcheck: test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080/healthz"] interval: 30s timeout: 10s retries: 3 start_period: 15s restart: unless-stopped networks: - homeai-net # ── PostgreSQL (n8n Backend) ───────────────────────────── postgres: image: postgres:16-alpine container_name: homeai-postgres ports: - "${POSTGRES_PORT:-5432}:5432" environment: POSTGRES_USER: ${POSTGRES_USER:-homeai} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env} POSTGRES_DB: ${POSTGRES_DB:-n8n} volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-homeai} -d ${POSTGRES_DB:-n8n}"] interval: 10s timeout: 5s retries: 10 start_period: 30s restart: unless-stopped networks: - homeai-net # ── n8n (Workflow Automation) ──────────────────────────── n8n: image: n8nio/n8n:latest container_name: homeai-n8n ports: - "${N8N_PORT:-5678}:5678" environment: DB_TYPE: postgresdb DB_POSTGRESDB_HOST: postgres DB_POSTGRESDB_PORT: 5432 DB_POSTGRESDB_DATABASE: ${POSTGRES_DB:-n8n} DB_POSTGRESDB_USER: ${POSTGRES_USER:-homeai} DB_POSTGRESDB_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env} N8N_HOST: ${N8N_HOST:-localhost} N8N_PROTOCOL: http WEBHOOK_URL: http://${N8N_HOST:-localhost}:${N8N_PORT:-5678}/ volumes: - n8n_data:/home/node/.n8n depends_on: postgres: condition: service_healthy restart: unless-stopped networks: - homeai-net # ── Optional: LibreTranslate (ML Translation) ─────────── libretranslate: image: libretranslate/libretranslate:latest container_name: homeai-libretranslate profiles: - extras ports: - "${LIBRETRANSLATE_PORT:-5000}:5000" environment: LT_LOAD_ONLY: ${LT_LOAD_ONLY:-en,es,fr,de} volumes: - libretranslate_data:/home/libretranslate/.local healthcheck: test: ["CMD-SHELL", "python3 -c \"import urllib.request; urllib.request.urlopen('http://localhost:5000/languages')\""] interval: 30s timeout: 10s retries: 5 start_period: 120s restart: unless-stopped networks: - homeai-net # ── Optional: Redis (Caching) ─────────────────────────── redis: image: redis:7-alpine container_name: homeai-redis profiles: - extras ports: - "${REDIS_PORT:-6379}:6379" volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 3 restart: unless-stopped networks: - homeai-net # ── Optional: ChromaDB Admin UI ───────────────────────── chromadb-admin: image: ghcr.io/flanker/chromadb-admin:latest container_name: homeai-chromadb-admin profiles: - extras ports: - "${CHROMADB_ADMIN_PORT:-3002}:3000" environment: CHROMADB_URL: http://chromadb:8000 depends_on: chromadb: condition: service_healthy restart: unless-stopped networks: - homeai-net volumes: ollama_data: openwebui_data: chromadb_data: postgres_data: n8n_data: libretranslate_data: redis_data: networks: homeai-net: name: homeai-net driver: bridge