# Auxot Server — self-hosted AI orchestration platform
# Usage: docker compose up
# Dashboard: http://localhost:8080
# Docs: https://auxot.com/docs

services:
  auxot:
    image: ghcr.io/auxothq/auxot-server:latest
    ports:
      - "8080:8080"
    environment:
      DATABASE_URL: postgres://auxot:auxot@postgres:5432/auxot?sslmode=disable
      REDIS_URL: redis://redis:6379
      AUXOT_SECRET_KEY: ${AUXOT_SECRET_KEY:-a01b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b}
    depends_on:
      postgres:
        condition: service_healthy
      redis:
        condition: service_healthy
    restart: unless-stopped

  postgres:
    image: pgvector/pgvector:pg17
    environment:
      POSTGRES_USER: auxot
      POSTGRES_PASSWORD: auxot
      POSTGRES_DB: auxot
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U auxot -d auxot"]
      interval: 5s
      timeout: 3s
      retries: 10
    restart: unless-stopped

  redis:
    image: redis:7-alpine
    volumes:
      - redis_data:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 5s
      timeout: 3s
      retries: 10
    restart: unless-stopped

volumes:
  postgres_data:
  redis_data:
