I want advice if the setup is alright. I've got a personal dev server which runs Ubuntu. I've setup Ubuntu completely with git, django, mod_wsgi and apache2 running. I'll be developing using my Mac laptop Professional.

My idea ended up being to have identical directory structure on machines from web root.


Mac: /path/to/webroot/

Ubu: /home/me/webroot/

And employ git to initiate the repo on Ubu server and clone it on my small mac and begin developing. By doing this I'll achieve:

  1. Multiple code instances. To ensure that if Ubuntu crashes, I've the code on Mac
  2. I'll possess the code in your area on my small Mac which can help should i be on the go.

Please advice if this is an excellent thinking or needs any improvement.

Sounds OK in my experience.

Multiple code instances. To ensure that if Ubuntu crashes, I've the code on Mac

If you wish to be extra paranoid (like I'm) you need to think about another place where your code can be obtained. A git solution like github plus something similar to Dropbox may be worth pondering.

In case your using Django, why bother setting up Apache. Django posseses an excellent dev atmosphere. I simply use: manage.py runserver

You accomplish your 2 points, just by getting git clones around the server as well as on your laptop for work. No requirement for Apache.

Two notes:

  1. Since I Have went right into a bug that happened on MySQL, but did not on sqlite, I test projects on a single dbbackend before implementing. However for development around the laptop, all I want is Python, Django and sqlite.

  2. I use exactly the same Python as around the deployment server. I have used on "Enterprise" distro's meaning ancient ("stable") versions, that miss new features. virtualenv helps keeping things seperated.

Both of these could be solved just by adding an additional 'test' deployment of the project around the server for any last testrun on a single platform right before your updates.

PS: If you do not mind setting up and setting up the additional software why don't you go full-scale and install an Ubuntu VM inside a virtualbox. You can even build your primary server a VM and each occasionally have a snapshot from the image on the highway...

edit: runserver will listen on port 8000 on localhost. If you wish to connect with it using their company hosts use manage.py runserver to pay attention on 8000 on all ip-addresser or, if you are worried on seeping info to snoopers, use ssh -L8000: <ubuntu-server> to tunnel 8000 on localhost (the consumer) to 8000 on localhost (your server) through ssh. Whichever meets your needs.