Django не может обслуживать файлы после перехода к композиции

Контекст

Hi, we have a big project in Django. Up until now, we have used Vagrant to run it. Now, we have decided to move to a container and use docker compose. Everything has worked out fine except for the serving of static files. We have a directory called web where we have all our static assets. Inside there, there are more subdirectories with more static assets.

Проблема

Right now static files are not being served. Is curious because only some files are being served. I think the ones from the web directory are not working for some reason.

Текущая конфигурация django

Эта конфигурация хорошо работала до перехода на docker.

# this is necessary because our settings file are stored inside a directoy
PROJECT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
PUBLIC_DIR = os.path.join(PROJECT_DIR, 'public')

STATIC_ROOT = os.path.join(PUBLIC_DIR, 'static')

STATIC_URL = '/static/'

STATICFILES_DIRS = (
    os.path.join(PROJECT_DIR, 'web'),
)

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

Дополнительная информация

Мы используем django-1.11 и python 3.6.9. Я знаю, это не самая последняя версия.

Композитная конфигурация

version: '3'
services:
    web:
        image: "dev"
        container_name: web
        ports:
            - "8000:8000"
        volumes:
            - ./:/app
        depends_on:
            - db
        networks:
            - djangonetwork
    db:
        image: "postgres"
        container_name: db
        ports:
            - "5432:5432"
        networks:
            - djangonetwork
networks:
  djangonetwork:
      driver: bridge

Есть идеи, в чем может быть проблема?

Вернуться на верх