Configuration changes: - Replace pydantic-settings with OmegaConf for flexible config management - Support YAML config files via CONFIG_FILE environment variable - Support environment variables with STEWARD__SECTION__KEY format - Add config_schema.yaml as default configuration schema - Create pydantic models for each configuration section for type safety - Maintain backward compatibility via properties on Settings class - Add CONFIGURATION.md with comprehensive setup and usage guide - Update pyproject.toml to include config_schema.yaml in package data Build/deployment changes: - Replace pip with uv in Dockerfile for faster dependency installation - Create docker-compose.dev.yml for local development (build .) - Keep docker-compose.yml for production (uses ghcr.io/djw4/steward:latest) - Update .env.example with new STEWARD__* variable format This setup is designed for Kubernetes deployment: - Non-sensitive config goes in ConfigMap (config.yaml) - Secrets go in Secret resources (environment variables) - Single unified configuration system for all environments
43 lines
1.2 KiB
Plaintext
43 lines
1.2 KiB
Plaintext
# Copy this file to .env and fill in your values.
|
|
# Never commit .env to version control.
|
|
|
|
# Telegram bot token from @BotFather
|
|
STEWARD__TELEGRAM__BOT_TOKEN=
|
|
|
|
# List of user IDs allowed to interact via DM (JSON format, empty = all users)
|
|
STEWARD__TELEGRAM__ALLOWED_USER_IDS='[1234567890]'
|
|
|
|
# List of group/channel IDs where bot operates (JSON format, empty = all groups)
|
|
STEWARD__TELEGRAM__GROUP_IDS='[-1005308306472]'
|
|
|
|
# OpenAI API key
|
|
STEWARD__OPENAI__API_KEY=
|
|
|
|
# OpenAI API base URL (can use any OpenAI-compatible provider)
|
|
STEWARD__OPENAI__BASE_URL=https://api.openai.com/v1
|
|
|
|
# Model to use
|
|
STEWARD__OPENAI__MODEL=gpt-4o
|
|
|
|
# Optional: Custom system prompt for the LLM
|
|
# STEWARD__OPENAI__SYSTEM_PROMPT="You are Steward..."
|
|
|
|
# Optional: Target URL for API analysis
|
|
STEWARD__ANALYSIS__TARGET_URL=
|
|
|
|
# Optional: API key for analysis target
|
|
STEWARD__ANALYSIS__TARGET_API_KEY=
|
|
|
|
# Cron schedule for automatic analysis
|
|
STEWARD__ANALYSIS__CRON_HOUR=8
|
|
STEWARD__ANALYSIS__CRON_MINUTE=0
|
|
|
|
# Path to thread memory storage (use absolute path in containers)
|
|
STEWARD__MEMORY__THREAD_MEMORY_PATH=/data/thread_memory.json
|
|
|
|
# Optional: MCP/OpenAPI tool server URL
|
|
STEWARD__TOOLS__MCP_SERVER_URL=
|
|
|
|
# Optional: API key for MCP server
|
|
STEWARD__TOOLS__MCP_SERVER_API_KEY=
|