- RECOMMENDED STACK
- Ubuntu 14.04
- Python 2.7
- Postgresql 9.3
- PostGIS 2.x
- Nginx 1.6
- Node JS 0.10.26
-
PACKAGE DEPENDENCIES - Ensure the following Apt pacakges are installed:
build-essential git libfreetype6 libfreetype6-dev libjpeg8-dev libjpeg8 libmysqlclient-dev openssh-client openssh-server binutils openssl postfix python-virtualenv sqlite3 sudo supervisor zlib1g zlib1g-dev libxml2-dev libxslt1-dev python-dev
Needed for mapnik
libboost-all-dev libmapnik libmapnik-dev mapnik-utils python-mapnik
Needed for postgres and postgis
gdal-bin postgresql-9.3-postgis postgresql-server-dev-9.3 python-psycopg2
Optional but recommended
ack-grep aptitude curl findutils mlocate graphviz-dev libgraphviz-dev htop
nmon screen subversion tig tmux vim fail2ban
- GEODJANGO SETUP - Prior to installation, a working GeoDjango Postgres Database is required.
Follow the instructions listed here, ignoreing any environment setup steps that you already followed. http://www.chicagodjango.com/blog/geo-django-quickstart/
-
To get mapnik to work, add this to the PYTHONPATH
export PYTHONPATH="$PYTHONPATH:/usr/lib/pymodules/python2.7/"
-
Create virtualenv
virtualenv windytransit
-
Activate Virtual Environment
cd windytransit; . ./bin/activate
-
Make needed directories
mkdir -p var/log/ mkdir -p data/ mkdir proj/; cd proj/
-
Checkout Code
git clone git@github.com:JoeJasinski/WindyTransit.git windytransit; cd windytransit
-
Install Python dependencies
export PROJECT_DIR=
pwd
pip install -r requirements.txt -
Copy the settings example file into place
cp mobiletrans/settings/local.example mobiletrans/settings/local.py
-
Adjust the local settings as desired, though the default should be enough to get started
-
Sync the database and migrate the database
./manage.py syncdb ./manage.py migrate ./manage.py bower install ./manage.py collectstatic
-
Change directory to the dir with the Dockerfile
-
Build the container
sudo docker build -t windy .
-
Run the container
sudo docker run -itP --rm --name joe windy
Or, mount the code directory for development
sudo docker run -itP --rm -v `pwd`:/site/app/ --name joe windy
generate_travel_heatmap - generates a travel heatmap given a station id. See the managment command help for usage.
shortest_path - calculates the shortest path between 2 stations. See the management command help for usage.
mt_import_[cityborder|ctarailline|googleplaces| hospitals|landmarks|libraries|neighborhoods| policestations|transitroutes| transitstops|zipcodes] - import usage data from a variety of sources See the management command help for usage.