2024-05-04 21:03:47 +01:00
|
|
|
# OWL-MAP
|
|
|
|
|
|
|
|
## Setup
|
|
|
|
* clone the project
|
2024-08-28 10:47:21 +01:00
|
|
|
* install geoip and postgis from your local package manager
|
|
|
|
* `$ sudo pacman -S postgis geoip`
|
2024-08-28 08:42:35 +01:00
|
|
|
* setup postgres on your machine, see e.g. https://wiki.archlinux.org/title/PostgreSQL
|
|
|
|
* `$ sudo su postgres`
|
|
|
|
* `$ initdb -D /var/lib/postgres/data`
|
|
|
|
* start postgres
|
|
|
|
* create postgres user
|
|
|
|
* `$ sudo su postgres`
|
2024-08-28 10:34:35 +01:00
|
|
|
* `$ createuser --interactive` -> "owl" role with relevant priviledges
|
2024-08-28 10:47:21 +01:00
|
|
|
* create postgres database "matcher" with hstore and postgis extensions
|
2024-08-28 10:34:35 +01:00
|
|
|
* `$ psql -U postgres`
|
|
|
|
* `> CREATE DATABASE matcher;`
|
|
|
|
* `> ALTER DATABASE matcher OWNER TO owl;`
|
2024-08-28 10:47:21 +01:00
|
|
|
* `> CREATE EXTENSION hstore;`
|
|
|
|
* `> CREATE EXTENSION postgis;`
|
2024-08-28 09:44:39 +01:00
|
|
|
* create the db tables
|
2024-08-28 10:47:21 +01:00
|
|
|
* setup database credentials and name in default.py
|
2024-08-28 10:34:35 +01:00
|
|
|
* `$ python create_db.py`
|
2024-08-28 08:42:35 +01:00
|
|
|
* setup a venv
|
2024-08-28 08:50:15 +01:00
|
|
|
* enter the venv, e.g. in pycharm
|
|
|
|
* `$ pip install -r requirements.txt`
|
2024-08-28 09:44:39 +01:00
|
|
|
* `$ cp config/example.py config/default.py`
|
|
|
|
* download id-tagging-schema
|
|
|
|
* `$ git clone https://github.com/openstreetmap/id-tagging-schema`
|
|
|
|
* adjust paths in default.py
|
|
|
|
* download geoip databases
|
|
|
|
* https://git.io/GeoLite2-City.mmdb
|
|
|
|
* `$ pacman -S geoip-database-extra` in ArchLinux or https://dl.miyuru.lk/geoip/maxmind/city/maxmind4.dat.gz
|
|
|
|
* adjust default.py
|
|
|
|
* run the tests
|
2024-05-04 21:03:47 +01:00
|
|
|
* run 'python web_view.py'
|