version: "3.9"
services:
  upage:
    image: upage-ai:production
    restart: unless-stopped
    ports:
      - "${PORT:-3000}:3000"
    environment:
      - OPERATING_ENV=${OPERATING_ENV:-production}
      - NODE_ENV=${NODE_ENV:-production}
      - LOG_LEVEL=${LOG_LEVEL:-debug}
      - DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX:-32768}
      - LLM_PROVIDER=${LLM_PROVIDER}
      - PROVIDER_BASE_URL=${PROVIDER_BASE_URL}
      - PROVIDER_API_KEY=${PROVIDER_API_KEY}
      - LLM_DEFAULT_MODEL=${LLM_DEFAULT_MODEL}
      - LLM_MINOR_MODEL=${LLM_MINOR_MODEL}
      - SERPER_API_KEY=${SERPER_API_KEY}
      - WEATHER_API_KEY=${WEATHER_API_KEY}
      - LOGTO_ENDPOINT=${LOGTO_ENDPOINT}
      - LOGTO_APP_ID=${LOGTO_APP_ID}
      - LOGTO_APP_SECRET=${LOGTO_APP_SECRET}
      - LOGTO_COOKIE_SECRET=${LOGTO_COOKIE_SECRET}
      - LOGTO_BASE_URL=${LOGTO_BASE_URL}
      - LOGTO_ENABLE=${LOGTO_ENABLE:-false}
      - USAGE_LOG_FILE=true
      - STORAGE_DIR=/app/storage
      - MAX_UPLOAD_SIZE_MB=${MAX_UPLOAD_SIZE_MB:-5}
    volumes:
      - ./data:/app/data
      - ./logs:/app/logs
      - ./storage:/app/storage

volumes:
  upage-db:
