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).
- Does not appear to have any patterns in it. If you see valid patterns in the file then the issue is probably caused by a circular import