From 171d13f9ca4c5b4e247a0f4325a2da296f6b39f9 Mon Sep 17 00:00:00 2001 From: Dennis Priskorn Date: Wed, 28 Aug 2024 11:47:21 +0200 Subject: [PATCH] doc: README: Add more information about creating the database and tables --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f091533..6a5bec6 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ ## Setup * clone the project -* install geoip and postgres from your local package manager +* install geoip and postgis from your local package manager + * `$ sudo pacman -S postgis geoip` * setup postgres on your machine, see e.g. https://wiki.archlinux.org/title/PostgreSQL * `$ sudo su postgres` * `$ initdb -D /var/lib/postgres/data` @@ -10,13 +11,14 @@ * create postgres user * `$ sudo su postgres` * `$ createuser --interactive` -> "owl" role with relevant priviledges -* create postgres database "matcher" +* create postgres database "matcher" with hstore and postgis extensions * `$ psql -U postgres` * `> CREATE DATABASE matcher;` * `> ALTER DATABASE matcher OWNER TO owl;` + * `> CREATE EXTENSION hstore;` + * `> CREATE EXTENSION postgis;` * create the db tables - * TODO find out where credentials are stored - * setup credentials in default.py + * setup database credentials and name in default.py * `$ python create_db.py` * setup a venv * enter the venv, e.g. in pycharm