0

I am attempting to build a reliable web App using Django and Nginx.

This web app is simple in design, will be built with an MVC styled design, and needs to be secure, yet speedy.

The question is how best to run a Python-Django-nginx based App on a server?

Is it better to add NGinx inside the container? or outside it?

proposed architecture idea Can someone correct this architecture or suggest improvements to it? I am just beginning with Docker, so i am unsure if this is the right way to go forward.

Any help is greatly appreciated

sidx4
  • 101
  • 2
  • Maybe you should try to clarify what you mean by "properly containerized and load balanced". There aren't really enough details here to answer effectively. – Grisha Levit Jan 15 '17 at 02:17
  • Thank you @GrishaLevit. I am modifying the answer to add as much detail as I can – sidx4 Jan 15 '17 at 14:55

1 Answers1

0

I was able to containerize Django and MongoDB, connect both containers and finally serve the running application using nginx.

It worked for me with a running nginx outside the container pointing to the exported port of the django container and the ip of the docker0 network (if you are using a linux machine)

I used uwsgi to run the application

Check this repo and follow the steps to run a dockerized django mongodb app.

  • Welcome to Serverfault! Since the link may die or contents change, would you add a short summary of the solution directly to this answer, please. – Esa Jokinen Jun 28 '17 at 05:29