Fabio
Fabio

Reputation: 129

Django local development, remote test and production configuration

I'm writing some django apps and I have this setup:

  1. local machine (laptop) that I use for development, with local dev virtualenv
  2. 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
  3. 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:

  1. develop on local machine new branch
  2. push branch to git
  3. deploy branch into test virtualenv
  4. test it
  5. test passed, push branch to master and deploy into production virtualenv

And I have lot of questions about this:

  1. is this a recommended approach?
  2. 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?
  3. 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.

Upvotes: 1

Views: 176

Answers (1)

Alex
Alex

Reputation: 6047

It seems almost right to me (but there are many strategies), I'd make a testing-branch, so you could continue pushing to develop-branch while others are testing the test-branch. Then when it passes the test merge to Master.

(Also, if you want to make your live easier, use fab files to 'pull' on the remote machine.)

Upvotes: 2

Related Questions