I can't get my head around on what's the "correct" way to deploy a Django project that uses uwsgi/gunicorn (I haven't decide yet what to use, probably uwsgi since it has better performances, suggestions?) and nginx using docker.
I saw that some people put everything in the same container. I'm not an expert of docker, but the container should just do one (1) thing. So, having Django + nginx seems to be 2 rather than 1.
Now, my idea of the deployment is:
- a container with Django and uwsgi. At the end of the Dockerfile i run the uwsgi script. This container exposes the port 8000
- a container with nginx that is linked to django one. This exposes port 80 and proxies the requests to django.
Is there any other way to do it? Is there a tutorial that covers this case a bit deeper. I need for a solid production, not just to test some code on my pc.