Dockeris required.
-
First of all, we need to build an image:
docker build -t teledu . -
Then, create a
.envfile in the root directory and fill it with the required variables. For more information onenvvariables, see the.env.examplefile.To get user IDs, you could use the
@username_to_id_botbot.To get a Telegram token, you should use the
@BotFatherbot.TELEGRAM_TOKEN= ADMIN_IDS=[] CONTACT_URL=https://t.me/username TEXTS_PATH=resources/texts.json (optional)
-
Just run the built image with the command:
docker run --name=teledu --env-file=.env teledu
*(Optional) I highly recommend protecting your database file using Docker volume. To do so, follow the command below:
docker run --name=teledu -v "<your\path>\base.sql:\code\base.sql" --env-file=.env teledu
Python 3.11or higher is required.
-
Install all dependencies:
python -m pip install -r requirements.txt
-
Run project with the command below:
python -m src.main
-
Install dependencies:
python -m pip install pre-commit
-
Set up pre-commit hooks and venv:
make init