add PostgreSQL instructions to README

This commit is contained in:
Maximilian Keßler 2023-07-05 21:41:05 +02:00
parent 07d943c1f3
commit f504ad0ddf
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -50,10 +50,21 @@ pip install -r requirements.txt
### PostgreSQL ### PostgreSQL
You need to install PostgreSQL on your system, for installation instructions refer to your distribution. You need to install PostgreSQL on your system, for installation instructions refer to your distribution.
Create a new database and user, put the connection parameters in a config file (see below). Create a new database and user, for example:
This should be at your system default for the application `hanabi-suite`, ```
$ sudo -iu postgres
$ psql
# CREATE DATABASE hanab-live;
# \c hanab-live
# CREATE USER hanabi WITH PASSWORD '1234';
# GRANT ALL PRIVILEGES ON DATABASE hanab-live TO hanabi;
# GRANT USAGE ON SCHEMA public TO hanabiuser;
# GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO hanabi;
# GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO hanabiuser;
```
Put the connection parameters in a config file (for the format, see `example_config.yaml`).
This should be located at your system default for the application `hanabi-suite`,
on POSIX systems this should be `~/.config/hanabi-suit/config.yaml`. on POSIX systems this should be `~/.config/hanabi-suit/config.yaml`.
For the format, see the example config file.
## Usage of stuff that already works: ## Usage of stuff that already works: