# MailSloth — customer co-host snippet (pull from GHCR; no git clone).
# Download from https://aimanac.llmtech.net/apps/mailsloth/setup/deploy/docker-compose.yml
# Pair with aimanac-server on the same host per /setup/llm/ fleet guide.

services:
  mailsloth-server:
    image: ghcr.io/everplay-tech/mailsloth-server:${MS_IMAGE_TAG:-rust-cutover-20260520-ghcr-pipeline}
    restart: unless-stopped
    ports:
      - "127.0.0.1:3010:3010"
    env_file:
      - mailsloth.env
    depends_on:
      postgres:
        condition: service_healthy

  postgres:
    image: pgvector/pgvector:pg16
    restart: unless-stopped
    environment:
      POSTGRES_USER: mailsloth
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}
      POSTGRES_DB: mailsloth
    volumes:
      - mailsloth_pg:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U mailsloth -d mailsloth"]
      interval: 5s
      timeout: 5s
      retries: 10

volumes:
  mailsloth_pg:
