feat: Add Telegram bot with group support
- Full Telegram bot implementation for Lightning Jackpot - Commands: /start, /buy, /tickets, /wins, /address, /jackpot, /help - Lightning invoice generation with QR codes - Payment polling and confirmation notifications - User state management (Redis/in-memory fallback) - Group support with admin settings panel - Configurable draw announcements and reminders - Centralized messages for easy i18n - Docker configuration included
This commit is contained in:
@@ -21,6 +21,22 @@ services:
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: lightning-lotto-redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
networks:
|
||||
- lightning-lotto-network
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ./back_end
|
||||
@@ -66,10 +82,32 @@ services:
|
||||
- lightning-lotto-network
|
||||
restart: unless-stopped
|
||||
|
||||
telegram-bot:
|
||||
build:
|
||||
context: ./telegram_bot
|
||||
dockerfile: Dockerfile
|
||||
container_name: lightning-lotto-telegram-bot
|
||||
depends_on:
|
||||
- backend
|
||||
- redis
|
||||
environment:
|
||||
TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN}
|
||||
API_BASE_URL: http://backend:3000
|
||||
FRONTEND_BASE_URL: ${FRONTEND_BASE_URL:-http://localhost:3001}
|
||||
REDIS_URL: redis://redis:6379
|
||||
MAX_TICKETS_PER_PURCHASE: ${MAX_TICKETS_PER_PURCHASE:-100}
|
||||
PAYMENT_POLL_INTERVAL_MS: ${PAYMENT_POLL_INTERVAL_MS:-5000}
|
||||
PAYMENT_POLL_TIMEOUT_MS: ${PAYMENT_POLL_TIMEOUT_MS:-900000}
|
||||
LOG_LEVEL: ${LOG_LEVEL:-info}
|
||||
NODE_ENV: production
|
||||
networks:
|
||||
- lightning-lotto-network
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
|
||||
networks:
|
||||
lightning-lotto-network:
|
||||
driver: bridge
|
||||
|
||||
|
||||
Reference in New Issue
Block a user