From: Seth Woodworth Date: Sat, 28 Jan 2012 18:30:41 +0000 (-0500) Subject: checking in bob's deploy scripts with comments X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f322945494bd4b7d86d192a887013995376043e1;p=oweals%2Ffinalsclub.git checking in bob's deploy scripts with comments --- diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..6b86d7b --- /dev/null +++ b/setup.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# this is sadly, out of date +# Bob, be bold and feel free to rewrite the old scripts rather than making new.sh + +# TODO: Update this to install node 0.6.8 and whatever the latest stable mongodb is as of 02012-01-28 +# Will involve building node on linux, so be sure to install build-essential +# TODO: install the latest stable npm from their website +# don't use the latest git version, use the one from the npm site + +## Start to deploy instructions +# git clone pathto fc repo +# cd FinalsClub +## checks out bc and EPL +# git submodule --update init +# npm install ./ + +# TODO: create separate deploy script for EPL +# should involve 'npm install ./' + + +exit + +sudo apt-get install mongodb git-core g++ libssl-dev curl make haproxy mysql-server ruby rubygems + +# Install node.js +curl http://nodejs.org/dist/node-v0.4.10.tar.gz > node-v0.4.10.tar.gz +tar xzvf node-v0.4.10.tar.gz +cd node-v0.4.10 +sudo ./configure +sudo make +sudo make install +cd .. + +# Install npm +git clone http://github.com/isaacs/npm.git +cd npm +sudo make install +sudo npm install nodemon -g +sudo npm install forever -g +cd /usr/bin +#ln -sf /usr/local/bin/node . +#sudo ln -sf /usr/local/bin/node . +#sudo ln -sf /usr/local/bin/forever . + +cd ~/ +sudo ./start.sh +exit diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..b0cafa3 --- /dev/null +++ b/start.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +# TODO update this with the contents of new.sh +exit # This breaks the script before it does anything else + +export PATH="/usr/local/bin:$PATH" + +cd ~ +rm -rf bc +git clone git://github.com/finalsclubdev/bc.git +cd ~/bc +npm install connect +npm install socket.io +npm install express-messages +npm install jade + +cd ~ +rm -rf FinalsClub +git clone git://github.com/finalsclubdev/FinalsClub.git +ln -sf FinalsClub fc + +cd ~/fc +git checkout master +git submodule init && git submodule update +npm install +cd etherpad-lite +npm install + +# install some dependencies +cd ~/fc +npm install connect +npm install socket.io +npm install express-messages +npm install jade + + +## init fcbackup +cd ~/fc/fcbackups +chmod 775 fcbackup_init.sh +./fcbackup_init.sh + + +## start the server +cd ~/fc +./restart + + + + + + +