This repository was archived by the owner on Jun 9, 2021. It is now read-only.
File tree 4 files changed +43
-3
lines changed
4 files changed +43
-3
lines changed Original file line number Diff line number Diff line change 1
1
__pycache__ /
2
+ .vagrant /
2
3
config.yaml
Original file line number Diff line number Diff line change 1
- # LPMC Site
2
-
3
- ### Getting Started
1
+ ### Getting started
4
2
5
3
1 . Install python 3.3 and postgresql (we use a [ new generator feature only available in 3.3] ( http://www.python.org/download/releases/3.3.4/ ) )
6
4
@@ -43,3 +41,9 @@ The authorization callback URL should probably be `http://localhost:8888/github_
43
41
1 . You can now run the server
44
42
` ./server.py `
45
43
Visit ` http://localhost:8888 ` or the specified port in ` config.yaml `
44
+
45
+ #### Using Vagrant
46
+
47
+ If you want to set up a virtual machine for this project using [ Vagrant] ( http://www.vagrantup.com/ ) and [ VirtualBox] ( https://www.virtualbox.org/ ) ,
48
+ simply follow step 2 to clone the project and run ` vagrant up ` .
49
+ Once complete you can skip to step 10 and do the rest of the steps in ` vagrant ssh ` .
Original file line number Diff line number Diff line change
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ Vagrant . configure ( "2" ) do |config |
5
+ config . vm . box = "raylu/debian-testing"
6
+ config . vm . network "forwarded_port" , guest : 8888 , host : 8888
7
+ config . vm . provision :shell , :path => "vagrant.sh"
8
+ config . vm . provider "virtualbox" do |vb |
9
+ vb . name = "lpmc-site"
10
+ end
11
+ end
12
+
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ sudo aptitude update
6
+ sudo aptitude --quiet --assume-yes install python3.3 python3.3-dev postgresql-9.3 libpq-dev
7
+
8
+ pyvenv-3.3 venv
9
+ source venv/bin/activate
10
+ wget --no-verbose https://raw.github.com/pypa/pip/master/contrib/get-pip.py
11
+ python3 get-pip.py
12
+ pip3 install -r /vagrant/requirements.txt
13
+ cat << EOF >> /home/vagrant/.bashrc
14
+ VIRTUAL_ENV="/home/vagrant/env"
15
+ PATH=\$ VIRTUAL_ENV/bin:\$ PATH
16
+ EOF
17
+
18
+ sudo sed ' s/\(local\s\+all\s\+all\s\+\)peer/\1trust/' -i /etc/postgresql/9.3/main/pg_hba.conf
19
+ sudo invoke-rc.d postgresql restart
20
+ sudo -u postgres psql --command " CREATE USER lpmc;"
21
+ sudo -u postgres psql --command " CREATE DATABASE lpmc;"
22
+ sudo -u postgres psql --command " GRANT ALL PRIVILEGES ON DATABASE lpmc to lpmc;"
23
+ psql -U lpmc < /vagrant/schema.sql
You can’t perform that action at this time.
0 commit comments