ElasticBeanstalk Django:请提供ENGINE值

时间:2017-05-20 19:33:53

标签: python django postgresql elastic-beanstalk

我正在尝试使用ElasticBeanstalk安装Django应用程序。它失败了settings.DATABASES is improperly configured. Please supply the ENGINE value

例外

完整错误:

Command failed on instance. Return code: 1 Output: (TRUNCATED)... in 
complain raise ImproperlyConfigured("settings.DATABASES is improperly
configured. " django.core.exceptions.ImproperlyConfigured: 
settings.DATABASES is improperly configured. Please supply the ENGINE value.
Check settings documentation for more details. 
container_command 01_migrate in .ebextensions/15_my.config failed. For more 
detail, check /var/log/eb-activity.log using console or EB CLI.`

当我的一个命令执行时,我收到此错误:

01_migrate:
command: "source /opt/python/run/venv/bin/activate && python manage.py migrate --noinput"
leader_only: True

这是我的config / settings / production.py

DATABASES = {
'default': {
    'ENGINE': 'django.db.backends.postgresql_psycopg2',
    'NAME': 'ebdb',
    'USER': 'djangousername',
    'PASSWORD': 'djangopassword',
    'HOST': env('RDS_HOSTNAME'),
    'PORT': '5432'
}
}

我确信EB只从这个文件中选择配置,而不是任何其他文件,因为如果我在这个文件中更改某些内容,它会在ElasticBeanstalk创建时反映出来。我还在整个申请中搜索了DATABASES仅在此文件中提及,即<app-rot>/config/settings/production.py<app-root>/config/settings/local.py。在这两个地方,我都提供了ENGINE值,如上所述。

如果我需要添加任何其他相关信息,请告诉我

0 个答案:

没有答案