-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
95 lines (73 loc) · 3.13 KB
/
Copy path.env.example
File metadata and controls
95 lines (73 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# ============================================
# PHP Bot Hosting Platform - Environment Variables
# ============================================
# Only TELEGRAM_BOT_TOKEN and ADMIN_USER_IDS are required.
# Everything else has sensible defaults or is auto-detected from Railway.
# ============================================
# REQUIRED - You must set these
# ============================================
# Get this from @BotFather on Telegram
TELEGRAM_BOT_TOKEN=your_bot_token_here
# Your Telegram user ID (comma-separated for multiple admins)
# Get it from @userinfobot on Telegram
ADMIN_USER_IDS=123456789
# ============================================
# DATABASE (SQLite by default - ZERO setup!)
# ============================================
# SQLite is the default - no external database needed!
# The database file is created automatically at ./data/bot.db
# DATABASE_URL=sqlite+aiosqlite:///./data/bot.db
# Optional: Use PostgreSQL instead (better for high-traffic production)
# DATABASE_URL=postgresql://user:password@host:5432/dbname
# ============================================
# AUTO-DETECTED FROM RAILWAY
# ============================================
# These are automatically set by Railway when you add the services.
# You do NOT need to set these manually on Railway.
# REDIS_URL=redis://... (auto from Railway Redis, optional)
# PORT=8000 (auto from Railway)
# ============================================
# OPTIONAL - Only set if you need to change defaults
# ============================================
# Telegram webhook (auto-configured in production)
# TELEGRAM_WEBHOOK_URL=https://your-app.railway.app/webhook
# TELEGRAM_WEBHOOK_SECRET=random_secret_string
# Application settings
# APP_ENV=production
# APP_DEBUG=false
# LOG_LEVEL=INFO
# Database pool settings (PostgreSQL only, ignored for SQLite)
# DATABASE_POOL_SIZE=20
# DATABASE_MAX_OVERFLOW=10
# Redis cache TTL (default: 3600 seconds)
# REDIS_CACHE_TTL=3600
# PHP settings (defaults work fine)
# PHP_FPM_SOCKET=/run/php/php8.3-fpm.sock
# PHP_MAX_EXECUTION_TIME=30
# PHP_MEMORY_LIMIT=128M
# Storage settings
# USER_BOTS_DIR=/data/user_bots
# MAX_UPLOAD_SIZE_MB=10
# Rate limiting
# RATE_LIMIT_PER_MINUTE=30
# RATE_LIMIT_PER_HOUR=500
# ============================================
# WORKER / LOAD BALANCING (optional)
# ============================================
# These settings control how bots are distributed across worker servers.
# No need to set these unless you're using multiple worker servers.
# Load balancing strategy: 'least_connections' or 'round_robin'
# WORKER_LOAD_BALANCER_STRATEGY=least_connections
# Worker health check interval in seconds (default: 60)
# WORKER_HEALTH_CHECK_INTERVAL=60
# Health check timeout in seconds (default: 10)
# WORKER_HEALTH_CHECK_TIMEOUT=10
# ============================================
# WORKER SERVER (for worker project only)
# ============================================
# These are used ONLY on worker servers, NOT on the main bot server.
# API key for authenticating with the main bot server
# Get this when you add a worker via /addworker command
# WORKER_API_KEY=wkr_xxxxxxxxxxxxxxxxxxxxxxxx
# Worker API port (default: 5000)
# WORKER_PORT=5000