-
Install locale support: i.e. in case
locale -a|grep hu_HU.utf8
reports nothing, you can fix that on e.g. Fedora usingdnf install glibc-langpack-hu
. -
Install
git
-
Install Python (3.6 or newer)
-
Install
make
-
Clone the repo:
git clone <URL> # You read this file somewhere, right? :-) cd osm-gimmisn
-
Set up a virtual environment:
python3 -m venv osm-gimmisn-env . osm-gimmisn-env/bin/activate
This makes sure that you will have exactly the same version of the depdendencies as everyone else.
-
Install the dependencies (Python, node and eslint):
pip install -r requirements.txt nvm install npm install
-
Build the generated code and data:
make
-
Run the tests:
make check
-
Create a local config and working directory:
cp data/wsgi.ini.template wsgi.ini mkdir workdir
Populate the reference directory with TSV files for the house number and street list.
-
A more production-friendly launcher is provided as
cherry.py
. -
A sample
osm-gimmisn.service
is provided, you can copy that to/etc/systemd/system/osm-gimmisn.service
and customize it to your needs. -
Use
systemctl start osm-gimmisn.service
to run the app server. -
Optionally, set up a reverse proxy with SSL support.
-
Optionally, add
cron.py
as a daily crontab:
# daily, at 0:05 5 0 * * * /home/osm-gimmisn/git/osm-gimmisn/osm-gimmisn-env/bin/python3 /home/osm-gimmisn/git/osm-gimmisn/cron.py
See ./cron.py --help
for details on what switches are supported for that script.
-
Optionally, add your Matomo URL and site ID to wsgi.ini:
# This does not include http:// or https://, but does include /path (without a trailing slash) if # your install path is not "/". matomo_url = analytics.example.com # This is typically an integer matomo_site_id = 1
Note that the Matomo template explicitly disables link tracking and cookies, since the intention is to monitor the usage of various relations, not to collect personal data. (So that used inactive relations can be turned into active ones and vica versa.)