-
Notifications
You must be signed in to change notification settings - Fork 20
/
INSTALL
61 lines (48 loc) · 1.74 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Below is a list of the requirements for installing this software. These need to
be installed for the system to function.
PostgreSQL - the database
PostGIS - for geographic objects in the database
osm2pgsql - for loading OSM data into the database
osmium-tool - for merging OSM files into a single file
memcached - caching for performance
The tool expects to find an e-mail server running on localhost and accepting
connection via SMTP. This is to send occasional e-mails to the administrator.
Python requirements:
sqlalchemy
psycopg2
GeoAlchemy2
geopy
Flask
flask-login
gevent
websockets
gunicorn
humanize
unidecode
termcolor
lxml
requests
simplejson
ua-parser
user-agents
pattern
num2words
Flask-WTF
flask-sock
The front-end libraries need to be installed in the matcher/static directory.
This list is the expected directory name, and the software required:
jquery jQuery
bootstrap4 Bootstrap 4
leaflet Leaflet
Leaflet.marketcluster Leaflet.marketcluster
A sample configuration file can be found in config/sample.py, this should be
copied to config/default.py, then modified to include information like the
database connection parameters and the name and e-mail address of the system
administrator.
The database can be created with this command:
FLASK_APP=matcher/cli.py flask create_db
The system is designed to be served from gunicorn. It can be started like this:
gunicorn --worker-class gevent autoapp:app -t 60000
The task queue that handles communication with the Overpass API needs to be run
separately. It is in the project root directory, this will start it:
python3 task_queue.py