A common method of deploying a python django app is to use something like gunicorn to run the dynamic content, and it will then spit out a of static content (think css and js files) that the client would need.
This would mean you would have a container serving your dynamic content and being proxied through xyz.com great. But how would you host the static content on the same domain, albeit in a different location? (under /static/)?
-
Create a second static container, with a basic nginx config that hosts the local content, on the same VIRTUAL_HOST. When I do this, the nginx proxy is alternating between which container gets the request.
-
Somehow alter the main nginx-proxy to have a location entry in the nginx config, in order to serve the content itself, or point to a docker container if a request is in /static/ .
That would look some thing like this, next to it's / entry.
location /static/ { root /some/place/on/nginx-proxy/static/; }