Files
microdao-daarion/CLOUDFLARE_TUNNEL_SETUP.md
Apple c78542c5ef feat: add dialog_summaries creation and fix memory integration
- Add create_dialog_summary() method to MemoryClient
- Fix syntax error in http_api.py (extra comma)
- Add CloudFlare tunnel setup instructions
- Gateway now logs conversations to Memory Service
2025-11-15 12:40:46 -08:00

76 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# CloudFlare Tunnel Setup для Telegram Bot
## Швидке налаштування
### 1. Встановити cloudflared
```bash
# На сервері
curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o /usr/local/bin/cloudflared
chmod +x /usr/local/bin/cloudflared
```
### 2. Авторизуватися
```bash
cloudflared tunnel login
```
### 3. Створити тунель
```bash
cloudflared tunnel create dagi-gateway
```
### 4. Налаштувати route
```bash
cloudflared tunnel route dns dagi-gateway gateway.daarion.city
```
### 5. Створити конфіг
Створити файл `~/.cloudflared/config.yml`:
```yaml
tunnel: <tunnel-id>
credentials-file: /root/.cloudflared/<tunnel-id>.json
ingress:
- hostname: gateway.daarion.city
service: http://localhost:9300
- service: http_status:404
```
### 6. Запустити тунель
```bash
# Як сервіс
cloudflared tunnel --config ~/.cloudflared/config.yml run dagi-gateway
# Або через systemd
sudo systemctl enable cloudflared
sudo systemctl start cloudflared
```
### 7. Оновити Telegram webhook
```bash
TELEGRAM_BOT_TOKEN="your-token"
WEBHOOK_URL="https://gateway.daarion.city/telegram/webhook"
curl -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/setWebhook" \
-d "url=${WEBHOOK_URL}"
```
## Перевірка
```bash
# Перевірити webhook
curl "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/getWebhookInfo"
# Перевірити тунель
curl https://gateway.daarion.city/health
```