部署到弹性beanstalk配置

时间:2014-12-23 09:05:37

标签: django postgresql amazon-web-services

这是我的配置:

我在.ebextensions中只有2个配置:01run.config和02do.config

.ebextensions / 01run.config

packages:
  yum:
    libxml2: []
    libxml2-devel: []
    libxslt: []
    libxslt-devel: []
    postgresql93-devel: []
    python-devel: []
    python27-devel: []

部署到EB时,有错误, 请帮我!!我还应该安装什么?谢谢

Error: pg_config executable not found.

Please add the directory containing pg_config to the PATH
or specify the full executable path with the option:

    python setup.py build_ext --pg-config /path/to/pg_config build ...

or with the pg_config option in 'setup.cfg'.
Complete output from command python setup.py egg_info:
running egg_info

django project settings.py:

if 'RDS_HOSTNAME' in os.environ:
    DATABASES = {
        'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': os.environ['RDS_DB_NAME'],
        'USER': os.environ['RDS_USERNAME'],
        'PASSWORD': os.environ['RDS_PASSWORD'],
        'HOST': os.environ['RDS_HOSTNAME'],
        'PORT': os.environ['RDS_PORT'],
    }
    }

0 个答案:

没有答案