Django Deploy ElasticBeanstalk StaticFiles(JS/CSS) не загружаются
Мои стили не загружаются:
settings.py:
STATIC_URL = '/static/'
STATIC_ROOT = BASE_DIR / 'static'
STATICFILES_DIRS = [BASE_DIR / 'templates/static']
MEDIA_URL = '/media/'
MEDIA_ROOT = BASE_DIR / 'media'
error eb logs:
Apr 26 06:11:06 ip-172-31-46-75 web: Not Found: /static/assets/bootstrap/css/animate.css
Apr 26 06:11:06 ip-172-31-46-75 web: Not Found: /static/assets/bootstrap/css/flex-slider.min.css
Apr 26 06:11:06 ip-172-31-46-75 web: Not Found: /static/assets/bootstrap/css/slicknav.min.css
Apr 26 06:11:06 ip-172-31-46-75 web: Not Found: /static/assets/custom/css/style.css
ETC..........
Я также сделал в своем окружении
python manage.py collectstatic
и
eb deploy
, он все еще не загрузил мои css/js (html прекрасно загружается)
мои .ebextensions:
option_settings:
aws:elasticbeanstalk:container:python:
WSGIPath: store.wsgi:application
Создать a
ststic-files.config
File и укажите директории
option_settings:
aws:elasticbeanstalk:environment:proxy:staticfiles:
/static: static
settings.py:
STATIC_URL = '/static/'
STATIC_ROOT = BASE_DIR / 'static'