Installation Guide¶
Run on your own computer with Docker¶
Install Docker
Install Docker Compose
Install Git
Clone this repository and change directory to
BAR_APIBuild docker images
docker compose build
Run docker containers (-d is detached)
docker compose up -d
Load
http://localhost:5000/in a web browser. Enjoy :)
Run on your own computer without Docker¶
Install Redis
Install Git
(Optional) On Debian based systems, you may also need to install
libmysqlclient-devandpython3-dev. On FreeBSD, you may need to installpy38-sqlite3. We will update this step as we come across more OS dependencies. You may also need to installdefault-libmysqlclient-devandbuild-essential.Clone this repository and change directory to
BAR_APISet up a virtual environment
python3 -m venv venv
Activate the virtual environment. Bash/Zsh:
source venv/bin/activate
csh/tcsh:
source venv/bin/activate.csh
Install requirements
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
Copy
config/BAR_API.cgito your preferred directory, for example:
cp config/BAR_API.cgi ~/.config/
Add, update, and modify passwords and environment variables as needed.
Copy
./config/init.shto BAR_API directory:
cp config/init.sh .
Change passwords in ./init.sh and run this script to load the databases:
./init.sh
Then delete ./init.sh.
Edit
./api/__init__.pyand update the location of your BAR_API.cfg file if you have changed it.Run
pytest. Tests should pass if the system is set up correctly.Run
python app.pyto start.Load
http://localhost:5000/in a web browser. Enjoy :)