Git Product home page Git Product logo

osucabs's Introduction

osucabs

Introduction

This project is the code base that powers the website http://osucabs.com. This website was born in 2009 as a means to provide quick mobile access for the Campus Area Bus Service on the Ohio State University campus. Since I have since graduated from OSU (and left Ohio), I have little desire or incentive to improve upon the site. Since the site still has several hundred users per month (Google Analytics), I want to give the code back to the students that use it to improve upon it and make it better!

Word of warning: This was one of my first big python projects so I'm sure the code is a bit sloppy at times, documented poorly, and has 0% test coverage. I encourage anyone that wants to help out to do so by submitting code cleanup as well as documentation. :)

This installation guide is setup up assuming you have a brand new server compatible with Redhat Enterprise Linux (e.g. CentOS, Scientific Linux, Amazon AMI). I have tested deploying to a clean Amazon EC2 Amazon AMI Linux instance several times. Feel free to get a hold of me if you have any issues!

Requirements

Required Packages (rpm distro)

httpd mod_wsgi python-setuptools python-devel # Required for lxml (can be removed after lxml install) gcc # Required for lxml (can be removed after lxml install) libxslt-devel # Required for lxml (can be removed after lxml install) mongo18-10gen-server # MongoDB Server

Required Python modules

web.py lxml pymongo

Installation

Add the 10gen Mondo DB repo

cat << EOF | sudo tee /etc/yum.repos.d/10gen.repo
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1
EOF

You need to have git to clone our repo, and apache to execute

sudo yum install -y git httpd mod_wsgi python-setuptools python-devel gcc libxslt-devel mongo18-10gen-server
sudo easy_install web.py lxml pymongo 

NOTE: I don't like the fact that we have to install gcc...but it is needed for lxml.

Here is where I put the directory. This should be changed to /var/www/

umask 022
sudo mkdir /webdata
cd /webdata/

Pull down the latest git repo

sudo git clone https://github.com/patrickshuff/osucabs.git

Copy our apache configuration into place

sudo cp /webdata/osucabs/osucabs_apache.conf /etc/httpd/conf.d/osucabs.conf

Configuration (Apply for your API key and update settings.py!)

You must apply for a developer API key before using this app

sudo cp  /webdata/osucabs/sample_settings.py  /webdata/osucabs/settings.py
sudo vim /webdata/osucabs/settings.py

Run it!

Make sure MongoDB is enabled on reboot

sudo chkconfig mongod on

Start MongoDB

sudo service mongod start

Make sure apache starts on boot

sudo chkconfig httpd on

Start the apache process

sudo service httpd start

Troubleshooting

The first place you should probably start (assuming you have apache installed, and the config in place) is looking at the apache error_log:

sudo less /var/log/httpd/error_log

The bus times on the webpage are way way off? what's up?

Well the problem is likely your server is in a different timezone. Make sure your server is set up to use eastern time zone

sudo cp /usr/share/zoneinfo/US/Eastern /etc/localtime

osucabs's People

Contributors

patrickshuff avatar marchese29 avatar

Watchers

James Cloos avatar Ria Mayacita Sugembong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.