Skip to content

Question: Serving static content #1081

@Mr-Reca

Description

@Mr-Reca

Hello everyone,

I'm using v1.8.0 in a v1.16.3 k8s cluster and I'm trying to deploy a Django application. As I checked in their documentation, Django doesn't serve static files in a production environment, but they can be collected in a path/host.
Django Deployment
Django Deploying static files

Is there a way to configure NGINX Ingress to serve that content from a pod?

Example:

  • The browser will request https://myapp/static/css/style.css
  • I need to serve the file /static_assets/css/style.css which is stored in the pod that serves myapp.

Maybe creating a location with nginx.org/server-snippets can do the trick.

Thanks in advance,

Metadata

Metadata

Assignees

Labels

questionAn issue asking a question

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions