I'm writing some django apps and I have this setup:
- local machine (laptop) that I use for development, with local dev
virtualenv
- remote machine VPS (with public address) used for test. I
need to have some end-users testing my app before moving to prod
with test virtualenv
- remote machine VPS (with public address, same as
above) used for production with production virtualenv
I use git for versioning.
The idea that I have so far (after reading various tutorials) to manage everything is:
- develop on local machine new branch
- push branch to git
- deploy branch into test virtualenv
- test it
- test passed, push branch to master and deploy into production
virtualenv
And I have lot of questions about this:
- is this a recommended approach?
- how can I get the new branch to test virtualenv and not to production? Do I need to have two separate app folders, one for prod and one for test?
- How can I then move code from test to prod?
Thanks in advance, I'm a django/git novice so I'm trying to approach it in the best way from start.