3

I would like to hear from other developers where they deploy their django (python web-app) app code on the filesystem (own server)- not django itself, but the project custom app code.

I'm on Ubuntu and have deployed django app code in user accounts or in /var/webapps (parallel to www root). No problem getting any of it to work, but would like to have a consistent "best practice".

I have scoured all the best practices documents and django books I can find, but can't seem to find any discussion of the best place to put the app code.

Hoping for some general guidance and to hear what others do.

VaTo
  • 3,071
  • 3
  • 18
  • 47
powderflask
  • 166
  • 5
  • Actually there isn't a "best practice" for this since there isn't a convention other than `/var/www`. Mostly, there are places were you should *not* use to deploy an app. Check out [this post](http://askubuntu.com/a/138551/62483) to understand the GNU/Linux file system structure. – Lucio Aug 23 '15 at 03:26
  • Thanks Lucio. From the FHS diagrams and the [flowchart](http://blog.danyll.com/content/images/2015/04/linux_directory_map_hd.png) there, it looks like /usr/bin, /srv, or /opt would all be reasonable choices? Those all make sense. What doesn't is why the conventional location for the web root is /var -- something else to go learn about. Appreciate the links. – powderflask Aug 23 '15 at 22:43
  • BTW - the one thing I did read in virtually every "django best practices" guide was to never install the software in the web root - /var/www – powderflask Aug 23 '15 at 22:47
  • 1
    Personally, I've built virtual environments under `/home`. So for instance, `/home/superdev/servers/super_project` is a reasonable path for a Django project. – Lucio Aug 24 '15 at 01:17

0 Answers0