anyway.co.il - Crowd-sourced road hazard reporting website.
Feel free to contribute to the project. It is currently hosted on Heroku: http://anyway.herokuapp.com/
-
Install Virtualbox and Vagrant
-
Clone this repo
-
Extract the accidents file into /static/data/lms
-
Run
vagrant up
in your shell -
Open http://127.0.0.1:5000 in your browser
-
Commit and send pull request
-
Have fun!
- Make some changes
- Refresh your browser
- If needed: Ctrl+C in the shell, run
vagrant provision
- Create an account on Heroku
- Follow the quickstart instructions. On step #4, read the Python introduction
- Create an app, e.g. anyway-mydev
- Sign up for free tier ClearDB (MySQL). Note that you'll have to enter your credit card details to be eligible for the free MySQL usage.
- Deploy your git repo to heroku
- Loading the database with our data:
- Tweak your Heroku app configurations, by removing
?reconnect=true
from your CLEARDB config (if you have several apps, specify the relevant one with the option --app for all following heroku commands):
heroku config:set CLEARDB_DATABASE_URL=$(heroku config:get CLEARDB_DATABASE_URL | cut -d '?' -f 1)
- Create tables:
heroku run ./models.py
- Populate data:
heroku run ./process.py --ratio 10
- Tweak your Heroku app configurations, by removing
- Read our forum (soon)
- Open an issue here
- Manual setup of our development stack
- We try to follow the process of other Hasadna projects, e.g. Open-Knesset
- After setting up Heroku access to the anyway app, run
heroku config --app anyway
and copy the value ofCLEARDB_DATABASE_URL
. - Install
mysql-workbench
on your computer and run it. - Run
mysql-workbench
and add a new connection with the credentials from the value ofCLEARDB_DATABASE_URL
: the part until the:
is the username; after that is the password; after the@
and before the/
is the hostname. Leave the port as it is. - Connect to the newly added connection, and in the sidebar select all entries under
Tables
, right click and drop all tables. - Back in your shell, run
export
CLEARDB_DATABASE_URL=<the value you got from heroku>` - Run
python models.py
to create the tables. - Get the latest data and extract it to a directory
static/data/lms/
. - Run
python process.py
to add the data to the tables.