Skip to content
Damien Brugne edited this page Jan 19, 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)

Pre-requisites

Server

  • node.js
  • MongoDB
  • Redis
  • nginx

Global packages (generally installed as root)

  • bower
  • grunt-cli
  • pomelo
  • pomelo-cli

Installation

Be sure you have correct DNS address (e.g.):

127.0.0.1		chat.local
127.0.0.2		ws.chat.local

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