Skip to content
yawetse edited this page Nov 11, 2014 · 12 revisions

coming soon

production setup for ubunutu

  1. install compliers on ubuntu: https://help.ubuntu.com/community/InstallingCompilers
  2. install mongodb - http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/ install node https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
  3. install node - https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
  4. install pm2
npm install pm2 -g --unsafe-perm
$ pm2 startup ubuntu # start as a service
  1. install nginx
  2. copy ssh keys to server if using ssh, or set up keys for deployments
 $ ssh-copy-id -i ~/.ssh/id_rsa.pub user@server
  1. on server, install git, make sure your server has acccess to git repo - https://help.github.com/articles/generating-ssh-keys/#platform-linux
  2. set up environment config
mywebapp/periodicjs/content/config/(config.json|environment/[environment].json)
  1. set up npm deployment
mywebapp/periodicjs/content/config/deployment/ecosystem.json
  1. push changes to github
  2. start on prod
$ npm run deploy_prod

on server

$ cd [/path/to/webapp]/current/periodicjs
$ npm run start_prod
  1. nginx conf: update your nginx conf to proxy nginx, sample config in content/config/deployment/periodic.nginx.conf

  2. restart nginx

$ service nginx restart