Server install bash

This commit is contained in:
Gaël Métais
2014-08-01 23:12:16 +02:00
parent 759dc3f8b5
commit aba5ef5a51
7 changed files with 61 additions and 5 deletions
+1
View File
@@ -1,3 +1,4 @@
node_modules
bower_components
.vagrant
results/*
Vendored
+17
View File
@@ -0,0 +1,17 @@
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :private_network, ip: "10.10.10.10"
config.ssh.forward_agent = true
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--memory", 512]
vb.customize ["modifyvm", :id, "--cpus", 2]
end
config.vm.provision :shell, :path => "server_config/server_install.sh"
end
+5 -4
View File
@@ -1,6 +1,10 @@
{
"name": "jsspaghettiprofiler",
"name": "yellowlabtools",
"version": "0.0.0",
"repository": {
"type": "git",
"url": "git://github.com/gmetais/YellowLabTools.git"
},
"dependencies": {
"phantomas": "git+https://git@github.com/gmetais/phantomas.git#jquery-profiler",
"express": "^4.6.1",
@@ -9,8 +13,5 @@
"body-parser": "^1.5.0"
},
"devDependencies": {},
"engines": {
"node": ">=0.10.0"
},
"scripts": {}
}
+2 -1
View File
@@ -1,3 +1,4 @@
var settings = require('./server_config/settings.json');
var fs = require('fs');
var async = require('async');
var express = require('express');
@@ -195,6 +196,6 @@ var taskQueue = async.queue(function queueWorker(task, callback) {
// Launch the server
server.listen(8383, function() {
server.listen(settings.serverPort, function() {
console.log('Listening on port %d', server.address().port);
});
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
# APT-GET
sudo apt-get update
sudo apt-get install lsb-release -y --force-yes
sudo apt-get install curl git -y --force-yes
# Installation of NodeJS
curl https://raw.githubusercontent.com/creationix/nvm/v0.12.2/install.sh | bash
source ~/.profile
nvm install v0.10.30
nvm use v0.10.30
# Installation of some packages globally
npm install bower -g
npm install forever -g
# Installation of YellowLabTools
sudo mkdir /space
sudo chown $USER /space
cd /space
git clone https://github.com/gmetais/YellowLabTools.git --branch master
cd YellowLabTools
npm install
bower install --config.interactive=false
# Start the server
rm server_config/settings.json
cp server_config/settings-prod.json server_config/settings.json
forever start server.js
+3
View File
@@ -0,0 +1,3 @@
{
"serverPort": 80
}
+3
View File
@@ -0,0 +1,3 @@
{
"serverPort": 8383
}