Updating Django App on server Updating Django App on server postgresql postgresql

Updating Django App on server


One lazy (yet recommended and professional) way of going about app updates is running automation script, like Fabric or Ansible.

However, if you wish to proceed the manual way (which is tedious), you might do something like:

  • Pull from git
  • Run migrations python manage.py migrate (This should ensure changes you made locally to your models reflect in production DB)
  • Run static collections to ensure new statics are reflected in server /static/ folder like so: python manage.py collectstatic
  • Then, restart your Django Server not Nginx. So something like: sudo service your_django_server_running_instance restart

On digitalOcean for instance (when used One-Click Install), your django server running instance is likely called gunicorn

Then you might want to look into automating your postgresql db as well