Skip to content

Repository files navigation

RUJIRA Notifications Bot

Telegram-Bot mit Webhook-Betrieb, GraphQL Subscriptions, JSON-Persistenz und Docker-Support.

Features

  • 🤖 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

Quick Start

Docker Deploy (Recommended)

```bash

1. Setup environment

cp .env.example .env

Edit .env with your credentials

2. Start container

docker compose up -d

3. View logs

docker compose logs -f bot ```

Local Development

```bash npm install npm run dev ```

VPS Deployment

```bash

1. Copy to VPS

rsync -avz --exclude 'node_modules' --exclude 'dist' --exclude 'data'
./ user@vps:/opt/rujira-notifications/

2. Setup on VPS

ssh user@vps cd /opt/rujira-notifications cp .env.example .env

Edit .env

docker compose up -d ```

Environment Variables

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

Bot Commands

  • /start - Start receiving notifications
  • /help - Show help message
  • /status - Show bot status

Persistence

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

Health Checks

  • GET /health - Health check
  • GET /ready - Readiness check

License

ISC

Docker Compose Files

  • 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

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages