I'm trying to deploy this repo to Elastic Beanstalk: https://github.com/jordanmessina/test_beanstalk/tree/5e9a919d991adf22bce1a9b8f6c1515e83b1babb with this configuration: 64bit Amazon Linux 2014.09 v1.0.9 running Python 2.7
I'm getting the following error on deployment:
ERROR: [Instance: i-2eb19dc2 Module: AWSEBAutoScalingGroup ConfigSet: null] Command failed on instance. Return code: 1 Output: [CMD-AppDeploy/AppDeployStage0/EbExtensionPostBuild] command failed with error code 1: Error occurred during build: Command 01_syncdb failed.
When I go to the webpage after deployment, all I see is: Index of /
Is there something wrong with my configuration file?
UPDATE
I made some changes and managed to get the app running and 500ing (progress).
I've poked around on the instances the code is deployed to. I've narrowed the issue down to the mod_wsgi
pythonpath that's setup. Here's the configuration:
LoadModule wsgi_module modules/mod_wsgi.so
WSGIPythonHome /opt/python/run/baselinenv
WSGISocketPrefix run/wsgi
WSGIRestrictEmbedded On
<VirtualHost *:80>
Alias /static/ /opt/python/current/app/static/
<Directory /opt/python/current/app/static/>
Order allow,deny
Allow from all
</Directory>
WSGIScriptAlias / /opt/python/current/app/webapp/beanstalk/wsgi.py
<Directory /opt/python/current/app/>
Require all granted
</Directory>
WSGIDaemonProcess wsgi processes=1 threads=15 display-name=%{GROUP} \
python-path=/opt/python/current/app:/opt/python/run/venv/lib/python2.7/site-packages user=wsgi group=wsgi \
home=/opt/python/current/app
WSGIProcessGroup wsgi
</VirtualHost>
I also found the logs for the httpd process (standard /var/log/httpd/error_log for future reference) and was tailing them to see what the issue was. The problem was an ImportError with beanstalk.settings (because it's not on the path).
Now I'm trying to think of a sane way to keep my app structure (webapp directory in the root containing my django app) and update the python path for mod_wsgi so this thing works...I'm very frustrated with the opinionated app structure that Elastic Beanstalk is trying to push on me. Any suggestions would be great!