python – How to properly serve static files through nginx in my django project

I’ve tried all possible configurations, but I don’t know why nginx doesn’t provide the static files for my application, that is, I always have a page without style.

This is my Dockerfile:
enter image description here

This is my entrypoint.sh
enter image description here

This is my static configuration on settings.py
enter image description here

This is my docker-compose.yml

enter image description here

I have a folder in the root of my project called nginx. Inside it I have the files:

Dockerfile
enter image description here

default.conf
enter image description here

I would like to understand what I’m doing wrong, I’ve tried other configuration structures, but nginx never serves the static files.

Read more here: Source link