Skip to content
Damien Brugne edited this page Jan 13, 2015 · 56 revisions

Hosting

Server connections

  • MongoDB production: localhost:27017/donut via SSH on : damien@5.196.206.60:22 (private key)
  • Redis production: localhost:6379 via SSH on : damien@5.196.206.60:22 (password)

Installation

Pre-requisites

  • node.js + npm
  • MongoDB
  • Redis
  • Bower
  • nginx

Project installation

Install global package (as root):

$ sudo su
$ npm install bower -g
$ npm install grunt-cli -g
$ npm install pomelo -g
$ npm install pomelo-cli -g
$ exit

Clone and install dependencies (as donut):

$ sudo su - donut
$ mkdir /home/donut/app  
$ cd /home/donut/app
$ git clone git@github.com:dbrugne/donut.git ./  
$ npm update
$ cd game-server
$ mkdir logs
$ npm update  
$ cd ../web-server
$ npm update  
$ bower update

Run Donut app (as donut): Source: https://github.com/unitech/pm2#a1

$ sudo su - donut
$ vi /home/donut/web.json
{
  "name" : "web",
  "script" : "./app.js",
  "cwd" : "/home/donut/app/web-server",
  "exec_mode"  : "fork_mode",
    "env": {
        "NODE_ENV": "test",
        "DEBUG": "donut:*",
    }
}
$ vi /home/donut/ws.json
{
  "name" : "ws",
  "script" : "./app.js",
  "cwd" : "/home/donut/app/game-server",
  "exec_mode"  : "fork_mode",
    "env": {
        "NODE_ENV": "test",
        "DEBUG": "donut:*",
    }
}
$ pm2 start /home/donut/web.json  
$ pm2 start /home/donut/ws.json  
$ pm2 save

Use pomelo-cli:

Clone this wiki locally