AJNinja
AJNinja

Reputation: 140

Django-Cms 2.4 South Migration on AWS Beanstalk

I have a Django app (still in development) built with Django-Cms 2.4 and its other dependencies, the problem i'm having is that during deployment to AWS Beanstalk Environment, the 01_syncdb command below fails whenever i add a new app to INSTALLED_APPS in settings.py.

In the .config file

I have the in the container commands:

01_syncdb:
    command: "django-admin.py syncdb --noinput"
    leader_only = True
02_migrate:
    command: "django-admin.py migrate --noinput"
    leader_only = True

log

2013-08-20 10:21:46,812 [DEBUG] (19029 MainThread) [commandWrapper.py-60] [root commandWrapper main] Command result: {'status': 'FAILURE', 'results': [{'status': 'FAILURE', 'config_set': u'Infra-EmbeddedPostBuild', 'returncode': 1, 'events': [], 'msg': 'Error occurred during build: Command 01_syncdb failed\n'}], 'api_version': '1.0'}

What could be wrong? Thanks

Upvotes: 0

Views: 889

Answers (1)

Victor
Victor

Reputation: 2909

To others that encounter this problem, you might want to check if you have mysql-python (or whatever database driver compatible with the database your project is using) included in your requirements.txt so that the system will know that you need this installed in your environment. Django won't be able to communicate with the database without this package.

I also predict that your second command (02_migrate) will fail since the migrate command will not be recognized by django-admin.py. Use the following instead

02_migrate:
     command: "python manage.py migrate --noinput"

Upvotes: 1

Related Questions