I'm trying to deploy a Django application to Elastic Beanstalk (AWS). I've started a new Django project from scratch.
When I try to deploy the application, I get the following errors:
ERROR: Failed to build Docker image aws_beanstalk/staging-app: ime="2015-04-02T16:04:13Z" level="info" msg="The command
[/bin/sh -c if [ -f /var/app/requirements.txt ]; then /var/app/bin/pip install -r /var/app/requirements.txt; fi] returne
d a non-zero code: 2" . Check snapshot logs for details.
ERROR: [Instance: i-b9cd0c44 Module: AWSEBAutoScalingGroup ConfigSet: null] Command failed on instance. Return code: 1 O
utput: [CMD-AppDeploy/AppDeployStage0/AppDeployPreHook/03build.sh] command failed with error code 1: /opt/elasticbeansta
lk/hooks/appdeploy/pre/03build.sh
I've tried to keep my project and configuration as basic as possible (still haven't been able to deploy a single django app through AWS, trying to understand what I'm doing wrong..).
In my root folder I have the .ebextensions folder, with the following config file:
container_commands:
01_syncdb:
command: "python testsite/manage.py syncdb --noinput"
leader_only: true
option_settings:
- option_name: DJANGO_SETTINGS_MODULE
value: testsite.settings
I've had to set the WSGIPath variable directly through the elastic beanstalk web GUI - for some reason setting it through the config file just didn't work.
Any ideas?
Aucun commentaire:
Enregistrer un commentaire