Install python 3.3 and postgresql (we use a new generator feature only available in 3.3)
Clone the project with submodules
git clone --recursive git@github.com:LearnProgramming/lpmc-site.gitIt would be best to install python dependencies just for the project by using a virtual environment
pyvenv-3.3 venvsource venv/bin/activateInstall pip in the venv
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.pypython3 get-pip.pyInstall dependencies from the requirements file
pip3 install -r requirements.txt
momoko requires psycopg2 which requires python3-dev and libpg-dev or your distro's equivalentIn
pg_hba.conf(usually at/etc/postgresql/9.3/main/), set local access totrust(as opposed to the defaultpeer)Create an lpmc user/role and database
sudo psql> create user lpmc;> create database lpmc;> grant all privileges on database lpmc to lpmc;Restart postgresql
sudo invoke-rc.d postgresql restartLoad the schema
psql -U lpmc < schema.sqlVisit the GitHub applications page and register a new developer application. The authorization callback URL should probably be
http://localhost:8888/github_oauthCopy the
config.yaml.exampletoconfig.yamland edit the configurationYou can now run the server
./server.py
Visithttp://localhost:8888or the specified port inconfig.yaml
If you want to set up a virtual machine for this project using Vagrant and VirtualBox,
simply follow step 2 to clone the project and run vagrant up.
Once complete you can skip to step 10 and do the rest of the steps in vagrant ssh.