You need mysqlclient installed. sudo apt-get install libmysqlclient-dev
or brew install mysql-client
or whatever.
pip install virtualenv
cd /path/to/project
virtualenv .venv --python=python3.10
source .venv/bin/activate
pip install pipenv
pipenv install
"UserWarning: Unknown distribution option: 'descriptions'" when installing uwsgi?LDFLAGS=-fno-lto pip install uwsgi
, then repeatexport TELEGRAM_TOKEN=...
export OWNER_TELEGRAM_ID=...
export DB_HOST=127.0.0.1
export DB_NAME=fatbot
export DB_USER=fatbot
export DB_PASSWORD=fatbot
alembic upgrade head
python fatbot.py
docker compose exec mysql mysql -uroot -proot
CREATE USER 'fatbot'@'192.168.%' IDENTIFIED BY 'fatbot';
GRANT ALL ON fatbot.* to fatbot@'192.168.%';
alembic revision -m "revisionname"
alembic upgrade head
alembic downgrade -1
pipenv install --dev
alembic upgrade head
pytest
cp .env.example .env
nano .env
sudo cp fatbot.service.example /etc/systemd/system/fatbot.service
sudo nano /etc/systemd/system/fatbot.service
sudo systemctl daemon-reload
sudo systemctl start fatbot
sudo systemctl enable fatbot
sudo visudo
- add
yakninja ALL=(ALL:ALL) NOPASSWD: /bin/systemctl start fatbot, /bin/systemctl stop fatbot, /bin/systemctl restart fatbot
- see logs with
journalctl -f -u fatbot