The bot was created as an order for people from Mariupol.
- Python 3.10;
- aiogram v2.21 (Telegram Bot framework);
- aiogram-dialog v1.8.0 (GUI framework for telegram bot);
- Docker and Docker Compose (containerization);
- PostgreSQL (database);
- SQLAlchemy v1.4.39 (working with database from Python);
- Alembic v1.8.0 (database migrations made easy);
- Clone the repository:
git clone git@github.com:abrikk/AdsBot.git
- Copy
.env.dist
to.env
and fill in the values - Up bot and environment by running:
docker compose up --build
- Unpack the backup file into folder where backup was made.
- Enter the shell with the database
docker compose exec --tty --interactive db /bin/sh
- Set user
export PGUSER=DB_USER
- Drop database
psql template1 -c 'drop database DB_NAME;'
- Create database
psql template1 -c 'create database DB_NAME with owner DB_USER;'
- Fill data into database from unpacked dump
psql DB_NAME < backups/daily/unpacked_backup_file.sql