added some hints to ease the installation

This commit is contained in:
groegert 2021-05-20 15:37:17 +00:00
parent 96e4e73f4b
commit 776332d5fe
1 changed files with 18 additions and 2 deletions

View File

@ -1,8 +1,10 @@
# Flaschengeist
This is the backend of the Flaschengeist.
## Installation
### Requirements
- mysql or mariadb
- including development files libmariadb-dev
- python 3.6+
### Install python files
pip3 install --user .
@ -30,9 +32,21 @@ Configuration is done within the a `flaschengeist.toml`file, you can copy the on
1. `~/.config/`
2. A custom path and set environment variable `FLASCHENGEIST_CONF`
Change at least the database parameters!
Uncomment and change at least all the database parameters!
### Database installation
The user needs to have full permissions to the database.
If not you need to create user and database manually do (or similar on Windows):
(
echo "CREATE DATABASE flaschengeist;"
echo "CREATE USER 'flaschengeist'@'localhost' IDENTIFIED BY 'flaschengeist';"
echo "GRANT ALL PRIVILEGES ON 'flaschengeist'.* TO 'flaschengeist'@'localhost';"
echo "FLUSH PRIVILEGES;"
) | sudo mysql
Then you can install the database tables and initial entries:
run_flaschengeist install
### Run
@ -41,6 +55,8 @@ or with debug messages:
run_flaschengeist run --debug
This will run the backend on http://localhost:5000
## Tests
$ pip install '.[test]'
$ pytest
@ -55,7 +71,7 @@ Or with html output (open `htmlcov/index.html` in a browser):
## Development
### Code Style
We enforce you to use PEP 8 code style with a line length of 120 as used by Black.
See also [Black Code Style](https://github.com/psf/black/blob/master/docs/the_black_code_style.md).
See also [Black Code Style](https://github.com/psf/black/blob/main/docs/the_black_code_style/current_style.md).
#### Code formatting
We use [Black](https://github.com/psf/black) as the code formatter.