How to setup a VPS with Django, Nginx, Gunicorn, Postgres and then properly deploy a Django application to it? [closed]

StackOverflow https://stackoverflow.com/questions/23159757

Question

Perhaps there is a definitive tutorial or blog describing what I'm looking for, but I haven't seen it. And being new to Django, I'm really looking for a proper way to both set up a VPS and deploy the project to it ... the latter in a repeatable/sensible way as the project evolves.

Here is what my project looks like:

  1. Using Django 1.6.2 + Postgres
  2. Project structure is essentially what is described here
  3. Static assets delivered locally in development need to be uploaded/delivered from S3 in production
  4. My VPS is a basic Linode running Ubuntu 13.10
Était-ce utile?

La solution

I would say Test-Driven Web Development with Python is a good one. It's mostly focused on TDD, but it's really good at covering the basics of Django as well. Chapter 8 talks about deployment and is pretty thorough.

EDIT:

Saw that that book doesn't use S3 for static files, so I'd recommend this blog post for dealing with that.

Autres conseils

This article: How To Install and Configure Django with Postgres, Nginx, and Gunicorn has some great instruction on getting the VPS setup, minus the S3 assets. For repeatable deployment do some research on fabric.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top