1

I have a VPS (OS: centos/debian) now. What I want is to develop my own website (RoR/python) and write some functional programs like parser, email sever and so on. What I am doing now is to write code and use ftp to push my code then use the root shell (which is lag and slow) on vps to run and debug. This is killing me. Can anyone tell me how to deal with this? And use what to replace the root shell?

Zanecola
  • 1,394
  • 3
  • 15
  • 27

1 Answers1

2

Try this.

  1. On your VPS install git
  2. Clone your repo and checkout a branch called production or something like that
  3. On your dev machine commit all code you want to deploy
  4. Merge it into production branch
  5. Login to VPS and cd into folder you cloned in step 2
  6. git pull should bring in all changes from git on production branch

All this can be automated but if you try this with a simple html file you will understand the process and feel comfortable doing gulp or grunt based automation of each step. Ideally you can have a task runner on development machine that will run deploy task and ssh to your vps, change directory to your git folder and pull changes, may have to stash existing changes and also backup last version somewhere else and run database migration if needed etc. But dont worry about all of this at this stage.

Farrukh Subhani
  • 2,018
  • 1
  • 17
  • 25