Skip to content

Commit 59a0b24

Browse files
committed
Run ggtracker in Vagrant.
1 parent 3d5d759 commit 59a0b24

File tree

5 files changed

+48
-4
lines changed

5 files changed

+48
-4
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ gem 'rails', '3.2.22'
88

99
gem 'mysql2'
1010

11-
gem 'unicorn', '1.1.5'
11+
gem 'unicorn'
1212

1313
# Gems used only for assets and not required
1414
# in production environments by default.

Gemfile.lock

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ GEM
157157
json (1.8.3)
158158
juggernaut (2.1.1)
159159
redis
160+
kgio (2.10.0)
160161
listen (1.1.6)
161162
rb-fsevent (>= 0.9.3)
162163
rb-inotify (>= 0.9)
@@ -213,6 +214,7 @@ GEM
213214
rake (>= 0.8.7)
214215
rdoc (~> 3.4)
215216
thor (>= 0.14.6, < 2.0)
217+
raindrops (0.16.0)
216218
rake (10.4.2)
217219
rb-fsevent (0.9.3)
218220
rb-inotify (0.9.2)
@@ -282,8 +284,9 @@ GEM
282284
unf (0.1.4)
283285
unf_ext
284286
unf_ext (0.0.6)
285-
unicorn (1.1.5)
286-
rack
287+
unicorn (5.1.0)
288+
kgio (~> 2.6)
289+
raindrops (~> 0.7)
287290
uuidtools (2.1.4)
288291
vegas (0.1.11)
289292
rack (>= 1.0.0)
@@ -332,4 +335,7 @@ DEPENDENCIES
332335
simplecov
333336
uglifier (>= 1.0.3)
334337
unf_ext (= 0.0.6)
335-
unicorn (= 1.1.5)
338+
unicorn
339+
340+
BUNDLED WITH
341+
1.11.2

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@ The other repos involved in ggtracker are:
1414
used by this codebase
1515

1616

17+
### Running with vagrant
18+
You can either run ggtracker in a vagrant-controlled virtualbox or on your host operating system (described after this section).
19+
To run with vagrant run the following commands:
20+
21+
* Make sure you have vagrant+virtualbox installed on your computer
22+
* Run `vagrant up` to create the virtual box
23+
* Run `vagrant ssh` to ssh into the vagrant box
24+
* Run `ssh-keygen` in the vagrant box to generate ssh-keys for github
25+
* Upload your public keys to Github
26+
* Clone `ggtracker` project to `vagrant` user's home directory in the vagrant box
27+
* Run the installation and updating steps below
28+
* The app will be on the vagrant box's ip instead of localhost.
29+
1730
### Requirements
1831

1932
* Ruby 1.9+ (get RVM: https://rvm.io/)

Vagrantfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Vagrant.configure("2") do |config|
2+
config.vm.box = "ubuntu/trusty64"
3+
config.vm.network :private_network, type: "dhcp"
4+
config.vm.hostname = "ggtracker"
5+
6+
config.vm.provision "shell", path: "setup-vagrantbox.sh"
7+
8+
config.vm.provider :virtualbox do |vb|
9+
vb.memory = 1536
10+
vb.cpus = 2
11+
vb.name = "ggtracker"
12+
end
13+
end

setup-vagrantbox.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
export DEBIAN_FRONTEND=noninteractive
4+
5+
add-apt-repository ppa:chris-lea/redis-server -y
6+
7+
apt-get update
8+
9+
apt-get install -y ruby redis-server nodejs npm mysql-server git-core ruby-dev libcurl4-openssl-dev libmysqlclient-dev build-essential libxml2-dev libxslt-dev
10+
11+
gem install bundler
12+
npm install -g juggernaut

0 commit comments

Comments
 (0)