forked from hacksu/kenthackenough
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprovision.sh
More file actions
executable file
·44 lines (37 loc) · 1.26 KB
/
provision.sh
File metadata and controls
executable file
·44 lines (37 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# nginx and node
apt-get update
apt-get install -y nginx node nodejs npm
npm install -g npm@3.3.x
npm install -g n mocha
n 4.0.0
# mongodb
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
apt-get update
apt-get install -y mongodb-org=2.6.10 mongodb-org-server=2.6.10 mongodb-org-shell=2.6.10 mongodb-org-mongos=2.6.10 mongodb-org-tools=2.6.10
service mongod start
# redis
apt-get install -y redis-server
service redis-server start
# nginx config
if [ -f /etc/nginx/sites-available/default ]; then
rm /etc/nginx/sites-available/default
rm /etc/nginx/sites-enabled/default
fi
if [ $1 == "dev" ]; then
cp /var/www/kenthackenough/config/dev.conf /etc/nginx/sites-available
ln -s /etc/nginx/sites-available/dev.conf /etc/nginx/sites-enabled
fi
service nginx reload
# install libraries
cd /var/www/kenthackenough
npm install
# pm2
npm install -g pm2
# bunyan logger
npm install -g bunyan
echo "Next steps:"
echo "-------------------------------------------------"
echo "| run tests: make vagrant-test |"
echo "| start the app: make vagrant-server |"
echo "-------------------------------------------------"