-
Notifications
You must be signed in to change notification settings - Fork 0
๐ ๏ธ Running Installation Guide
Warning
I would probably prefer if you don't run an instance of my bot. And I'm honestly not a very good programmer. Nevertheless:
Requirements:
- Python
3.12or higher - SQL database, preferably
PostgreSQL
Installations steps are as follows:
-
Clone the repository with
git clone https://github.com/Aluerie/IreBot cd ./IreBot
-
Set up venv with your preferred Python package manager. This repository is already set up with
uvso steps 2-4 will be automatically done byuvduringuv run src/main.py, but feel free to use any other (py,pdm, ...) package/project manager. The repository also featuresMakefilewhich gives handy shortcuts for common CLI commands - usingmake runcalls properuv runcommand (so again, steps 2-4 are automatically done this way).python3.12 -m venv venv # or py -m venv venv # or etc
-
Activate the venv with
./venv/Scripts/Activate.ps1 # powershell windows source ./venv/bin/activate # ubuntu # or etc
-
Install dependencies with
python3.12 -m pip install -U -r requirements.txt # or py -m pip install -U -r requirements.txt # or etc
-
Rename-copy
.env.exampleto.envand fill out all the needed config parameters, api-keys, credentials and passwords in it. -
Replace twitch ID and some other constant variables in files under
/utils/constfolder with your own. -
Create SQL tables using definitions from
.sql-files insqlfolder. -
Run the bot with
make runor directlyuv run src/main.py, or your preferred way to launch.pyfiles. Note that I chose to have working directory as project root folder and run the bot withuv run src/main.pyover switching directory tosrcfirst.
Personally, I use systemd for process managing. You can use anything you like though: dockers, simple manual python src/main.py, etc. An example of my .service file is in the repository root folder.
Tip
A good template for .service files can be found in gist by @mikeshardmind. The options are explained pretty well at freedesktop.org.
Thanks for reading ๐
These are useful only for myself, but I don't really have any better place to keep them.