One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" | |
| wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
| sudo apt-get update | |
| sudo apt-get install postgresql-9.6 | |
| sudo apt-get install postgresql-9.6-postgis-2.3 | |
| sudo apt-get install postgresql-9.6-pgrouting | |
| sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable | |
| sudo apt-get update |
| ### Solr Install ### | |
| Install pysolr and django-haystack and set up django-haystack. Setup for haystack is pretty straight forward: | |
| https://django-haystack.readthedocs.org/en/v1.2.7/tutorial.html | |
| Make sure you follow the haystack instructions for the correct version of haystack that you installed, | |
| as some of the setting variables are different depending on the version. | |
| # SSH into the server that you want to install Solr on |
| from rest_framework.views import exception_handler | |
| def custom_exception_handler(exc): | |
| """ | |
| Custom exception handler for Django Rest Framework that adds | |
| the `status_code` to the response and renames the `detail` key to `error`. | |
| """ | |
| response = exception_handler(exc) |
| # Logging settings for django projects, works with django 1.5+ | |
| # If DEBUG=True, all logs (including django logs) will be | |
| # written to console and to debug_file. | |
| # If DEBUG=False, logs with level INFO or higher will be | |
| # saved to production_file. | |
| # Logging usage: | |
| # import logging | |
| # logger = logging.getLogger(__name__) | |
| # logger.info("Log this message") |
At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)
Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.
| 1. Install Linux updates, set time zones, followed by GCC and Make | |
| sudo yum -y update | |
| sudo ln -sf /usr/share/zoneinfo/America/Indianapolis \ | |
| /etc/localtime | |
| sudo yum -y install gcc make | |
| 2. Download, Untar and Make Redis 2.8 (check here http://redis.io/download) |
| [unix_http_server] | |
| file=/tmp/supervisor.sock ; path to your socket file | |
| [supervisord] | |
| logfile=/var/log/supervisord/supervisord.log ; supervisord log file | |
| logfile_maxbytes=50MB ; maximum size of logfile before rotation | |
| logfile_backups=10 ; number of backed up logfiles | |
| loglevel=error ; info, debug, warn, trace | |
| pidfile=/var/run/supervisord.pid ; pidfile location | |
| nodaemon=false ; run supervisord as a daemon |
| # Be sure to save your config files. Optional but I do: | |
| sudo cp /etc/postgresql/9.3/main/postgresql.conf ~ | |
| sudo cp /etc/postgresql/9.3/main/pg_hba.conf ~ | |
| # Package repo (for apt-get) | |
| wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
| sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list.d/postgresql.list' | |
| # Also probably optional but I like to update sources and upgrade | |
| sudo apt-get update |