I have an app where I want to run it from aws_wsgi.py instead of application.py, as there are several different entry points depending on where we are hosting it. For this reason, I would like to be able to change the WSGIPath variable to point to the correct location.
This, in an .ebextensions .config file, does not work:
option_settings:
- namespace: "aws:elasticbeanstalk:container:python"
option_name: WSGIPath
value: "/opt/python/current/app/aws_wsgi.py"
The environment attempts to use 'application.py' despite the above lines. No error appears to be emitted.
We run with a saved configuration, and in the dashboard, that configuration shows that WSGIPath is "application.py". But there is nowhere to change that value in the dashboard. It seems like it is a built-in value that overrides the data we send with the above config file.
I tried adding it as an environment variable via the dashboard, but that goes in the aws:elasticbeanstalk:application:environment
namespace and does not affect how the application is started up in the first place. (I checked this by using eb config
to download the configuration.)
Maybe I could add a section in the file retrieved by eb config
, but I heard that doing that will start to override .ebextensions files, and I have several important commands in my .ebextensions files that I need to continue using. It's not clear from the documentation how .ebextensions data translates to and compares with config files used by eb config but the .ebextensions files are well-documented and reasonably convenient so I'd rather not break those if possible!
How do I get AWS to respect my chosen WSGIPath?
Aucun commentaire:
Enregistrer un commentaire