I have two servers, a
Dev server and a
Production server. The
Production server runs a live Django site, while the
Dev server has a copy of the Django project. I use the
Dev server to work on the Django site, make improvements, fix bugs, etc. Once I am satisfied with how the
Dev version is working, I move the whole Django directory from the
Dev server and replace the same directory on the
Production server. The two servers are not on the same LAN so the process is not straight forward.
There are a few issues with this that I am having so far.
- Moving the whole directory is laborious and time consuming
- If I only change a few files, it is even move tedious to replace a few files than the whole directory since the project is getting fairly large and I worry that I'll miss something
- I often run into permission issues after I've moved things
- It's super inefficient, and, due to lack of time, I haven't bothered figuring out a new method. Now it's just getting out of hand and i need to address the situation.
I am thinking I need to move to a GIT repository for this process. But my question is how would I set this all up?
- Do I host the repository on the
Productionserver, pull from the
Devserver, do work, then commit? Then I would pull from the
Productionserver (same server the repo is hosted on) to run the current working version?
- Do I host the repo on the
DevServer, pulling from the same server to do work on the repo, then pull a working version onto the
- Should I be hosting the repo on a different server than the
Productionserver and the
Devserver (a third server)?
- Are there any special considerations with Django and repos that I need to worry about?
Thanks for the help :)