我做了一个小Django应用程序;我想在AWS上部署它。我遵循命令here。现在,当我做eb create
它没有说无法在AWS Elastic Beanstalk中创建环境?
ERROR: Your requirements.txt is invalid. Snapshot your logs for details. ERROR: [Instance: i-05fde0dc] Command failed on instance. Return code: 1 Output: (TRUNCATED)...) File "/usr/lib64/python2.7/subprocess.py", line 540, in check_call raise CalledProcessError(retcode, cmd) CalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1. Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py failed. For more detail, check /var/log/eb-activity.log using console or EB CLI. INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
详细日志here。我的数据库在postgresql中,为此我必须运行单独的RDS实例吗?
我config.yml
branch-defaults: master: environment: feedy2-dev group_suffix: null global: application_name: feedy2 default_ec2_keyname: aws-eb default_platform: Python 2.7 default_region: us-west-2 profile: eb-cli sc: git
我的01-Django的eb.config
option_settings:
"aws:elasticbeanstalk:application:environment":
DJANGO_SETTINGS_MODULE: "feedy2.settings"
PYTHONPATH: "/opt/python/current/app/feedy2:$PYTHONPATH"
"aws:elasticbeanstalk:container:python":
WSGIPath: "feedy2/feedy2/wsgi.py"
container_commands:
01_migrate:
command: "django-admin.py migrate"
leader_only: true
我的目录结构: . ├── feedy2 │ ├── businesses │ │ │ ├── customers │ │ │ ├── db.sqlite3 │ ├── feedy2 │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── settings.py │ │ ├── settings.pyc │ │ ├── urls.py │ │ ├── urls.pyc │ │ ├── wsgi.py │ │ └── wsgi.pyc │ ├── manage.py │ ├── questions │ │ │ ├── static │ ├── surveys │ └── templates ├── readme.md └── requirements.txt
我改变了很多东西不知道到底是什么;现在我收到了一个不同的错误。 'ImportError:没有名为feedy2.settings的模块。 '添加有问题的树结构。 – Coderaemon
这看起来像拼写错误,并且与问题中提到的问题无关。 – tedder42