Last active
August 29, 2015 14:23
-
-
Save DavidGinzberg/7fe06408ba8681049ddf to your computer and use it in GitHub Desktop.
A setup script for running a habitrpg development environment on Google Cloud Compute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
print_status() { | |
echo | |
echo "## $1" | |
echo | |
} | |
print_status 'Fetching and running setup script for nodejs installation' | |
curl -sL https://deb.nodesource.com/setup | sudo bash - | |
print_status 'Installing necessary packages: mongodb, nodejs, git, bzip2, libfontconfig1' | |
sudo apt-get install -y mongodb nodejs git bzip2 libfontconfig1 | |
print_status 'Installing necessary global packages from npm' | |
sudo npm install -g grunt-cli bower phantomjs | |
print_status 'Setting routing for port 3000 access over http' | |
sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3000 | |
print_status 'Now it`s your turn. Run the following commands and you`re all set' | |
echo git clone https://github.com/HabitRPG/habitrpg.git | |
echo cd habitrpg | |
echo git checkout develop | |
echo npm install | |
echo cp config.json.example config.json | |
echo npm start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment