-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·51 lines (36 loc) · 1.11 KB
/
bootstrap.sh
File metadata and controls
executable file
·51 lines (36 loc) · 1.11 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
45
46
47
48
49
50
51
#!/usr/bin/env bash
#
# Copyright RIKSOF (Private) Limited 2016.
#
# Installation scripts for getting vm ready with needed software.
# Make sure respositories are up to date.
apt-get update
# Install Node.js and its package manager
apt-get install -y nodejs npm
# Make nodejs accessible as node
# http://stackoverflow.com/questions/18130164/nodejs-vs-node-on-ubuntu-12-04
ln -s `which nodejs` /usr/bin/node
# Install forever, to make sure API simulator keeps running.
npm install forever -g
npm install forever-service -g
# Install Nginx
apt-get install -y nginx
# Copyg Nginx configuration file.
cp /vagrant/coding-tester.nginx.conf /etc/nginx/sites-enabled/.
# Re-start nginx
service nginx restart
# Now copy the source to our home drive. This is needed to make sure
# our service starts even when shared drive is not available.
cp -r -f /vagrant/client/ /home/vagrant
pushd /home/vagrant/client
# Install node modules
npm install
popd
# Start the server
#pushd /home/vagrant/simulator
# Install dependencies
#npm install
# Start the server
#forever-service install api --script api/server.js
#service api start
#popd