Skip to content

armgit / ODS

Public Imported from GitHub
0

ODS V3 Pre-Release: Public testing and refinement ahead of the official V3 launch. Turn your PC, Mac, or Linux box into a private AI server.

1.0 KB
Raw Blame
# Token Spy — LLM usage monitoring service
services:
  token-spy:
    extra_hosts:
      - "host.docker.internal:host-gateway"
    build:
      context: ./extensions/services/token-spy
      dockerfile: Dockerfile
    container_name: ods-token-spy
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    ports:
      - "127.0.0.1:${TOKEN_SPY_PORT:-3005}:8080"
    volumes:
      - ./data/token-spy:/app/data:z
    environment:
      - OLLAMA_URL=${LLM_API_URL:-http://llama-server:8080}
      - TOKEN_SPY_API_KEY=${TOKEN_SPY_API_KEY:-}
    deploy:
      resources:
        limits:
          cpus: '1.0'
          memory: 1G
        reservations:
          cpus: '0.25'
          memory: 256M
    healthcheck:
      test: ["CMD-SHELL", "python3 -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/health')\""]
      interval: 30s
      timeout: 5s
      retries: 3
      start_period: 10s
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"