I'm trying to deploy a django app with Elasticbeanstalk, following this setup
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html
and this
https://www.1strategy.com/blog/2017/05/23/tutorial-django-elastic-beanstalk/
At the first attempt, in the .ebextension/django.config, I have
option_settings:
"aws:elasticbeanstalk:application:environment":
DJANGO_SETTINGS_MODULE: "my_django_path_name.settings"
PYTHONPATH: "$PYTHONPATH"
"aws:elasticbeanstalk:container:python":
WSGIPath: "my_django_path_name/wsgi.py"
StaticFiles: "/static/=www/static/"
when calling eb create
, it complains about
ERROR: ServiceError - Configuration validation exception: Invalid option specification (Namespace:
'aws:elasticbeanstalk:container:python', OptionName: 'StaticFiles'): Unknown configuration setting.
So I took out the StaticFiles part, and eventually it becomes
option_settings:
"aws:elasticbeanstalk:container:python":
WSGIPath: "my_django_path_name/wsgi.py"
and it STILL complains about the unknown OptionName: StaticFiles
Then I used the example in https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-container.html#python-namespaces with minor tweaking
option_settings:
aws:elasticbeanstalk:application:environment:
DJANGO_SETTINGS_MODULE: production.settings
aws:elasticbeanstalk:container:python:
WSGIPath: ebdjango.wsgi:application
NumProcesses: 3
NumThreads: 20
yet it STILL complains about the same thing.
I don't know where the StaticFiles option name is being read. It doesn't exist in the .config file. Is it cached somewhere or something?
Marcin :
Based on the discussion in the comments, it was found that that the issue was caused by the fact eb was deploying an old version from git, rather then the local, corrected version of the application.\n\nThe solution was to push the changes to git so that new version get deployed.",
2020-05-29T03:46:04