9👍
✅
Based on production experience, it’s better to counterpart rule from docker docs one container for one process
. You’re shipping a (micro-)service with docker image, and if it’s required to have nginx in it, you include it.
So basically for django app there are:
- nginx (e.g.: for static files)
- gunicorn or uwsgi
- django code itself
Don’t see any perfomance issue on adding nginx to container, but little note on docker image size. On ubuntu:16.04/debian:jessie by adding nginx-full you increase your image size for around ~100mb. (some overhead on first pulling image).
So it’s not controversal to second scenario, because you can also add nginx behind your docker image for balancing purpose (or proxy_pass managing).
Source:stackexchange.com