-
Notifications
You must be signed in to change notification settings - Fork 17
Deployments
Alan David Garcia edited this page Sep 10, 2015
·
12 revisions
coming soon
npm run deploy dev
#production setup for ubunutu
- install compliers on ubuntu: https://help.ubuntu.com/community/InstallingCompilers
- 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
- install nodejs-legacy on ubuntu
sudo apt-get install nodejs-legacy
- install npm on ubuntu
sudo apt-get install npm
- install node - https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
- install pm2
$ npm install pm2 -g --unsafe-perm
$ pm2 startup ubuntu # start as a service
- install forever and nodemon
$ npm install forever -g
$ npm install nodemon -g
- install nginx
$ sudo apt-get install nginx
- copy ssh keys to server if using ssh, or set up keys for deployments
*
$ ssh-copy-id -i ~/.ssh/id_rsa.pub user@server
- on server, install git, make sure your server has access to git repo
$ sudo apt-get install git
- add your keys to your github - https://help.github.com/articles/generating-ssh-keys/#platform-linux
- create directory for app on server
$ cd /var/www && mkdir mywebapp
- set up environment config
- set up the deployment environments
mywebapp/periodicjs/content/config/deployment/ecosystem.json
- If you are not using the install extension, you need to set up your config files manually:
$ mywebapp/periodicjs/content/config/(config.json|environment/[environment].json)
- you can specify relative path to public key from mywebapp/periodicjs directory
- commit your changes to github
- set up run pm2 deployment
- from periodicjs directory
$ npm run deploysetup [name of deployment environment]
- test your periodic app
$ cd path/to/webapp/current/periodicjs && npm install --production
- create log directory
$ mkdir logs
$ npm start [name of environment]
- once its working, stop your server
npm stop
- run your application forever
$ npm run forever [name of environment]
- push changes to github
- start on prod
$ npm run deploy_prod
on server
$ cd [/path/to/webapp]/current/periodicjs
$ npm run start_prod
-
nginx conf: update your nginx conf to proxy nginx, sample config in
content/config/deployment/periodic.nginx.conf
-
restart nginx
$ service nginx restart
- Home
- Getting Started
- Installation
- Upgrades
- Content Management & Data
- Content Entities
- Content Taxonomy
- Content Types
- Content Management System
- Themes
- Switching Themes
- Installing Themes
- Creating Themes
- Extensions
- Managing Extensions
- Installing Extensions
- Creating Extensions
- Configuration
- Database Configuration
- Environment Configuration
- Environment Setup
- Deployment Configuration
- PM2 Deployments
- Development
- FAQ