This version of the bot is optimized for Render's Free Tier with persistent storage via PostgreSQL and a keep-alive web server.
prism_bot.py: Main bot code (PostgreSQL & Web Server enabled).requirements.txt: Python dependencies.Dockerfile: Container configuration.render.yaml: One-click deployment configuration.
- Create a Private repository on GitHub (e.g.,
prism-bot). - Upload all the files in this package to that repository.
- Sign up/Login to Render.com.
- Click "New +" and select "Blueprint".
- Connect your GitHub account and select your
prism-botrepository. - Render will automatically detect the
render.yamlfile. - You will be prompted to enter your
BOT_TOKEN:- Paste your token from @BotFather.
- Click "Apply". Render will now create:
- A free PostgreSQL database.
- A background worker for your bot.
Since it's a free tier, Render might sleep the bot if it doesn't receive web traffic.
- Once deployed, Render will give you a URL (e.g.,
https://prism-bot.onrender.com). - Go to cron-job.org (Free).
- Create a new cron job to "ping" your Render URL every 10 minutes. This ensures the bot stays online 24/7.
If you need to change settings later, go to the Environment tab in Render:
BOT_TOKEN: Your Telegram Bot Token.BTC_ADDRESS:bc1qdtngv6cwgh502pf726lef6632cza9d5s54x56m(Already set inrender.yaml).DATABASE_URL: Automatically linked from your Render Database.