- Install Docker and Docker Compose.
- Create your Telegram application following instructions.
- Get the bot token from @BotFather.
- Clone our repository:
git clone https://github.com/Nnenty/steal_stickers_bot
- Cd into catalog:
cd steal_stickers_bot
- Copy config.toml.example, remove
.example
from name of file and fill it required information. - Copy .env.example, remove
.example
from name of file and fill it the same required information as in your fileconfig.toml
.
To authorize client run command below:
just auth
or if you want run it manually:
docker build -t steal_stickers_bot . && \
docker run -it --rm \
--mount type=bind,source=./configs,target=/app/configs \
--name steal_stickers_bot steal_stickers_bot \
auth
After you have launched Docker, a code should be sent to your Telegram account. Enter this code into your terminal.
To run bot use command below:
just compose-run
or if you want run it manually:
docker compose up
After running bot will start working, but database will be without migrations. To solve it, run command below with your database information (that you put into .env
and config.toml
files):
sqlx migrate run --source ./src/infrastructure/database/migrations --database-url="postgres://{username}:{password}@{host}:{port}/{db}"
If you encounter errors that are directly related to my code (docker errors, bot errors, etc.), please open an Issue. Thanks :)
Licensed under:
- MIT License (LICENSE or https://opensource.org/license/MIT)