diff --git a/CLAUDE.md b/CLAUDE.md index f19a5f3..eb09c21 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -21,7 +21,7 @@ This is a production infrastructure for AI-Impress, running on OVH server (ubunt ├── opt/ # Main services (synced to server /opt) │ ├── 00-infrastructure/ # Core: Traefik, PostgreSQL, Redis, Vault, RabbitMQ, Loki │ ├── 01-security/ # Authentik (SSO), Vaultwarden -│ ├── 02-core/ # n8n (automation), Evolution API (WhatsApp), Supabase +│ ├── 02-core/ # n8n (automation), Evolution API (WhatsApp), Supabase, BigBlueButton │ ├── 03-business/ # Odoo (ERP), Outline (wiki), Documenso, Wiki.js │ ├── 04-tools/ # Portainer, Grafana, Prometheus, Uptime Kuma │ ├── 05-backups/ # Backup scripts and data (NOT in Git) @@ -92,6 +92,12 @@ ssh ubuntu@51.89.231.46 "systemctl --user status syncthing" # View sync size du -sh /Volumes/SSD/Aimpress_Cloud_Prod/{opt,data,home,mnt} + +# Force rescan of a folder +ssh ubuntu@51.89.231.46 "curl -X POST http://localhost:8384/rest/db/scan?folder=opt -H 'X-API-Key: \$(grep apikey ~/.local/state/syncthing/config.xml | sed 's/.*\(.*\)<\/apikey>.*/\1/')'" + +# Check folder status via API +ssh ubuntu@51.89.231.46 "curl -s http://localhost:8384/rest/db/status?folder=opt -H 'X-API-Key: \$(grep apikey ~/.local/state/syncthing/config.xml | sed 's/.*\(.*\)<\/apikey>.*/\1/')' | python3 -m json.tool" ``` ### Backup Operations @@ -101,6 +107,28 @@ Backup scripts are in `/opt/05-backups/scripts/`: - Scripts use Restic for incremental backups to Cloudflare R2 - See `/opt/05-backups/SCRIPTS-REGISTRY.md` for full script inventory +### Vault Operations + +```bash +# Read a secret from Vault +ssh ubuntu@51.89.231.46 "docker exec vault vault kv get secret/myapp" + +# Write a secret to Vault +ssh ubuntu@51.89.231.46 "docker exec vault vault kv put secret/myapp key=value" + +# List all secrets +ssh ubuntu@51.89.231.46 "docker exec vault vault kv list secret/" + +# Export secrets (use with caution) +ssh ubuntu@51.89.231.46 "cd /opt/05-backups/scripts && ./export-vault-secrets.sh" +``` + +**Important:** Vault integration in docker-compose uses environment variables: +```yaml +environment: + - DB_PASSWORD=${VAULT_DB_PASSWORD} # Read from Vault via script +``` + ## Git Workflow ### Automated Git Hooks @@ -188,6 +216,23 @@ n8n-shared runs in queue mode with Redis: - Workers 3-4: Medium concurrency (15 jobs) - Webhooks and OAuth endpoints bypass authentication for external access +### BigBlueButton Configuration + +BigBlueButton is deployed for workshops and webinars: +- Multi-container setup with separate services (HTML5, Freeswitch, Kurento, etc.) +- GraphQL API for real-time data +- Integration with Odoo via `bbb_connector` addon +- Webhooks for meeting events +- Data stored in `/opt/02-core/bigbluebutton/` + +### Odoo Custom Addons + +Odoo supports custom addons in `/opt/03-business/odoo/extra-addons/`: +- `bbb_connector/` - BigBlueButton integration +- `virtual_meeting/` - Virtual meeting management +- Addons are automatically discovered on Odoo restart +- Add addon path to `odoo.conf`: `addons_path = /mnt/extra-addons` + ### Database Architecture - Single PostgreSQL instance (`postgres-main`) serves multiple services @@ -258,3 +303,27 @@ When adding new services: - Workflow details: `.claude/workflow.md` - Backup scripts: `opt/05-backups/SCRIPTS-REGISTRY.md` - Main README: `README.md` + +--- + +## 🚨 КРИТИЧЕСКИ ВАЖНО: Выбор модели + +**ВСЕГДА используй Haiku (`model: "haiku"`) для:** +- ✅ Работы в терминале (Bash, ssh команды) +- ✅ Чтения и редактирования файлов (Read, Edit, Write) +- ✅ Поиска в коде (Grep, Glob) +- ✅ Работы с Docker/Git +- ✅ Отладки и исправления ошибок +- ✅ Любых практических задач по коддингу + +**Используй Sonnet ТОЛЬКО для:** +- 📊 Сложного планирования архитектуры +- 📋 Анализа требований пользователя +- 🎯 Принятия стратегических решений +- 🔍 Глубокого анализа проблем + +**Примеры:** +``` +❌ НЕПРАВИЛЬНО: Task(subagent_type="general-purpose", prompt="собери credentials") +✅ ПРАВИЛЬНО: Task(subagent_type="general-purpose", model="haiku", prompt="собери credentials") +``` \ No newline at end of file