Skip to content

Instantly share code, notes, and snippets.

@lourinaldi
Last active November 4, 2015 21:44
Show Gist options
  • Save lourinaldi/9511c5c2c8e65d9b1f73 to your computer and use it in GitHub Desktop.
Save lourinaldi/9511c5c2c8e65d9b1f73 to your computer and use it in GitHub Desktop.
working with the newhaven.io website

Updated on 11/4/2015 for changes made in scotchbox 2.5

A working and current VirtualBox Guest Additions installation is required if you wish to use a shared folder for local development and committing.

We'll use vagrant so you don't pollute your local.

--

cd $HOME

git clone https://github.com/scotch-io/scotch-box

cd scotch-box

vagrant up

vagrant ssh

sudo apt-get -y install mongodb phantomjs bundler

cd /var/www

git clone https://github.com/newhavenio/newhavenio-website.git

cd newhavenio-website

cat <<EOT >> .env
GITHUB_CLIENT_ID=PUT-SOME-THING-HERE
GITHUB_CLIENT_SECRET=PUT-SOME-THING-HERE
GITHUB_CALLBACK_URL=http://localhost:9000/auth/callback
MONGOHQ_URL=mongodb://localhost/newhaven-io
COOKIE_SECRET=whatever-doesnt-matter-locally
KNOWN_ADMINS=your-github-login
EOT

mkdir -p /home/vagrant/data/db

sudo gem install bundler

bundler

sudo npm install grunt-cli -g

export MONGOHQ_URL=mongodb://localhost/newhaven-io

mongod --dbpath /home/vagrant/data/db &

foreman run grunt server --force

...then browse to http://192.168.33.10:9000/

open a new terminal, cd scotch-box, vagrant ssh, cd /var/www/newhavenio-website, hack away!

(alternately, you can open a new terminal, cd scotch-box/newhavenio-website and hack away locally, using your local git.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment