Been messing with this most of the day and have been stumped.
nginx-ingressisn’t designed to serve static files per this Github
gunicornisn’t either per documentatoin
WhiteNoiseworks locally with
gunicorn, but doesn’t seem to like
nginx-ingressand just returns a:
Resource interpreted as Stylesheet but transferred with MIME type text/html
I’ve tried a few things, one of which:
FROM python:3.7-slim, copying the app over and then installing
nginxinto the image. Doesn’t seem like a good practice and couldn’t get it working.
The only other thing I can think of trying is a
service just for the static files. However, not sure how to set that up, particularly the routing.
Any suggestions, or guidance, on how to serve static files (particularly Django Admin) in a k8s setup?