- Create virtual environment.
python -m venv venv
- Activate it.
- On windows:
venv/Scripts/activate
- On linux:
source venv/bin/activate
- Install requirements.
pip install -r requirements.txt
# Telegram
TOKEN='Bot token'
IDEAS_GROUP_ID='id of ideas group'
APPROVED_IDEAS_GROUP_ID='id of approved ideas group'
BUGS_GROUP_ID='id of bugs group'
# Paths
POPPLER_PATH='Absolute path to bin directory of poppler'
# Postgres
POSTGRES_HOST='localhost'
POSTGRES_PORT=5432
POSTGRES_DB='1580'
POSTGRES_USER='postgres'
POSTGRES_PASSWORD='postgres'
# Redis
REDIS_HOST='localhost'
REDIS_PORT=6379
REDIS_DB=0
- Create tables.
CREATE TABLE users (
id SERIAL,
tg VARCHAR,
username VARCHAR,
class VARCHAR,
building VARCHAR,
teacher VARCHAR
);
CREATE TABLE staff (
id SERIAL,
tg VARCHAR,
username VARCHAR,
role VARCHAR
);
- Run main.py
python main.py
-
Install docker.
-
Run app.
docker compose up --build
-
Create fork on GitHub.
-
Clone it locally.
-
Push changes to fork.
-
Create pull request to master branch.