[Unit]
Description=Radionica3D Telegram Queue Daemon
After=network.target redis.service

[Service]
Type=simple
User=www-data
Group=www-data
WorkingDirectory=/var/www/radionica3d/backend
Environment=PYTHONPATH=/var/www/radionica3d/backend
Environment=REDIS_HOST=localhost
Environment=REDIS_PORT=6379
# BOT_TOKEN should be set here or in a separate env file
Environment=BOT_TOKEN=YOUR_BOT_TOKEN_HERE
ExecStart=/var/www/radionica3d/backend/venv/bin/python scripts/telegram_daemon.py
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target
