Home:ALL Converter>AWS ElasticBeanstalk how to upload staticfiles with django

AWS ElasticBeanstalk how to upload staticfiles with django

Ask Time:2022-04-27T11:42:56         Author:Kaynan Kaynan Felipe Rodrigues

Json Formatter

I tried uploading staticfiles:

aws:elasticbeanstalk:enviroment:proxy:staticfiles: /static: /static

got this error in

2022-04-27 03:34:07    ERROR   "option_settings" in one of the configuration files failed validation. More details to follow.
2022-04-27 03:34:07    ERROR   Invalid option specification (Namespace: 'aws:elasticbeanstalk:enviroment:proxy:staticfiles', OptionName: '/static'): Unknown configuration setting.
2022-04-27 03:34:07    ERROR   Failed to deploy application.

ERROR: ServiceError - Failed to deploy application.

I also tried only doing

python manage.py collectstatic

and it did not work

I tried my settings.py in this way:

STATIC_URL = '/static/'
STATIC_ROOT = 'static'

and this way(current way im utilizing):

STATIC_URL = '/static/'
STATIC_ROOT = 'static'
STATICFILES_DIRS = [BASE_DIR / 'templates/static']

Author:Kaynan Kaynan Felipe Rodrigues,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/72023005/aws-elasticbeanstalk-how-to-upload-staticfiles-with-django
yy