Telegram-Bot mit Webhook-Betrieb, GraphQL Subscriptions, JSON-Persistenz und Docker-Support.
- 🤖 Telegram Bot mit Webhook
- 📡 GraphQL Subscriptions via WebSocket
- 💾 JSON-basierte Chat-Persistenz
- 🚦 Rate Limiting mit Bottleneck
- 🐳 Docker & Docker Compose Support
- 📝 TypeScript mit striktem Mode
- ✅ Zod Environment Validation
- 📊 Pino JSON Logging
- 🚀 Fastify HTTP Server
- 🔄 Graceful Shutdown mit Auto-Save
```bash
cp .env.example .env
docker compose up -d
docker compose logs -f bot ```
```bash npm install npm run dev ```
```bash
rsync -avz --exclude 'node_modules' --exclude 'dist' --exclude 'data'
./ user@vps:/opt/rujira-notifications/
ssh user@vps cd /opt/rujira-notifications cp .env.example .env
docker compose up -d ```
| Variable | Required | Default | Description |
|---|---|---|---|
TELEGRAM_TOKEN |
✅ | - | Bot token from @BotFather |
GRAPHQL_URL |
❌ | wss://preview.rujira.network | GraphQL endpoint |
GRAPHQL_API_KEY |
✅ | - | GraphQL API key |
PUBLIC_WEBHOOK_URL |
✅ | - | Public webhook URL |
WEBHOOK_PORT |
❌ | 8080 | HTTP server port |
/start- Start receiving notifications/help- Show help message/status- Show bot status
Chats werden automatisch in ./data/active-chats.json gespeichert:
- Auto-Save nach 5 Sekunden
- Graceful Shutdown speichert sofort
- Volume-Mount in Docker:
./data:/app/data
GET /health- Health checkGET /ready- Readiness check
ISC
- docker-compose.yml - Production (uses pre-built image)
- docker-compose.dev.yml - Development (builds from source)
# Production (pre-built image)
docker compose up -d
# Development (build from source)
docker compose -f docker-compose.dev.yml up -d --build