Skip to content
shaoke edited this page Mar 12, 2016 · 1 revision

Deploy data is separated with deploy admin and mobile. This means deploy data just deploy data to DataBase, and it will remove all your previous data on you DataBase.

Prerequire

  1. NodeJS.

If you didn't install NodeJS on your computer, you can download NodeJS, and install it.

After installed, you can open your terminal, and type node --version to test.

If you didn't install successful, then you will see command not found: node, otherwise, you will see your NodeJS version. 2. Meteor.

Following this document to install Meteor. Same with NodeJS, you can use meteor --version to test whether install successful.

Deploy to Production Server

  1. Update code. git pull --rebase or the way you familiar
  2. Modify data-transfer/run.sh. Use Prod DB, not local DB, after change the code should be same with following:
# local db
#export MONGO_URL=mongodb://localhost:27017/EdminForce
# Prod DB
export MONGO_URL=mongodb://admin.classforth.com:27017/EdminForce
  1. Open a terminal, and navigate to data-transfer folder, run sh run.sh. It will start to deploy data to Production Server. This will take several minute. In the deploy process, the terminal continues to print log, when it stop print log, it means deploy data is finished. (This part we can try to make it more user-friendly, for example, after it finished, print a message "Finish deploy")

  2. You can test on http://admin.classforth.com or http://classforth.com now.

Deploy to Local Server

  1. Start Admin Base. Go to source/admin-base, run sh run.sh
  2. Start Mobile Base. Go to source/mobile-base, run sh run.sh
  3. For other steps is same with Deploy to Production Server.

Note: Make sure you use Local DB in step 2.