Thursday, February 11, 2016

Re: How to update a live / deployed Django project?

We are using two git branches, one for development and master. When dev branch is good enough, we merge it to master and then we have a script which does git pull and restarts uwsgi.

Rok

On Wednesday, February 10, 2016 at 9:50:22 AM UTC+1, Tobias Dacoir wrote:
We've build a small web application using Django 1.8 over the past couple of months and we are going live with version 1.0 soon (one last closed beta test is coming up).
So far we have deployed it on an Ubuntu VM (in Azure) using Apache / Nginx and a local MySQL Server.

I've already found some good tutorials on how to properly set it up (http://rogueleaderr.com/post/65157477648/the-idiomatic-guide-to-deploying-django-in#disqus_thread ) however what I am mising now is how to handle updates to our code.

For our development server we have a git hook that automatically deploys new commits to the server. However that often requires manual interaction - running manage.py makemigrations etc. Sometimes Django also does not pick up our changed models and we have to manually fiddle with the Database in order to get it back running. We even had times where we lost all our data since it was easier to just start with a new database.

Obviously this can't happen once we are live and obviously we want downtime to be as small as possible. So is there any guide on how to update code of a live, deployed Django application?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0f5f95e5-c75f-4028-ab48-0dca2c5660eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment