YOUR_APP
directorycd /opt/bitnami/apps/YOUR_APP/
sudo git clone https://YOUR_GIT_URI/GIT_USERNAME/YOUR_PROJECT_REPO.git htdocs
Navigate to source
cd htdocs
Update and Install dependencies
sudo apt-get update -q
sudo apt-get install -yqq aptitude git traceroute dnsutils tree tcpdump psmisc gcc make build-essential libfreetype6 libfontconfig libkrb5-dev curl
sudo apt-get install -y ruby
sudo gem install sass
sudo npm install --quiet -g grunt-cli gulp bower yo mocha karma-cli pm2 grunt
sudo npm install --quiet --production
sudo bower install --quiet --allow-root --config.interactive=false
export NODE_ENV=production
export PORT=3000
export DB_1_PORT_27017_TCP_ADDR=127.0.0.1
export MONGODB_USERNAME=YOUR_DATABASE_USER
export MONGODB_PASSWORD=YOUR_DATABASE_PWD
mongolab
(change host, port, username, password and db name)mongodump --host YOUR_MLAB_HOST --port YOUR_MLAB_PORT --username YOUR_MLAB_USERNAME --password YOUR_MLAB_USERNAME --db YOUR_MLAB_DB_NAME --excludeCollectionsWithPrefix YOUR_DIRECTORY_DO_NOT_NEED_BACKUP
mongorestore --host 127.0.0.1:27017 --db YOUR_DB_NAME --username YOUR_DB_USERNAME --password YOUR_DB_PWD dump/YOUR_MLAB_DB_NAME/
pm2
pm2 start server.js
Apache
Serversudo /opt/bitnami/ctlscript.sh restart
pm2
pm2 list
pm2 restart all
pm2
pm2 list
pm2 stop all