遵循 AWS 说明 ( https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html )
当前正在尝试运行“eb deploy”并输出以下内容:
Creating application version archive "app-220413_141345835306".
Uploading: [##################################################] 100% Done...
2022-04-13 20:14:00 INFO Environment update is starting.
2022-04-13 20:14:05 INFO Deploying new version to instance(s).
2022-04-13 20:14:09 ERROR Instance deployment failed. For details, see 'eb-engine.log'.
2022-04-13 20:14:11 ERROR [Instance: i-0fb1ab203cc59f0d1] Command failed on instance. Return code: 1 Output: Engine execution has encountered an error..
2022-04-13 20:14:11 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2022-04-13 20:14:11 ERROR Unsuccessful command execution on instance id(s) 'i-0fb1ab203cc59f0d1'. Aborting the operation.
2022-04-13 20:14:11 ERROR Failed to deploy application.
ERROR: ServiceError - Failed to deploy application.
在日志中我看到:
2022/04/13 20:00:19.230141 [INFO] finished extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/ successfully
2022/04/13 20:00:19.231105 [ERROR] An error occurred during execution of command [app-deploy] - [StageApplication]. Stop running the command. Erro
r: chown /var/app/staging/venv/bin/python: no such file or directory
有什么想法要做什么吗?我不知道这条路从哪里来
最佳答案
这里的第二个答案对我有用:AWS Elastic Beanstalk chown PythonPath error
我在我的主项目目录中添加了一个名为 .ebignore 的文件:
~/ebdjango/
|-- .ebignore
|-- .ebextensions
| `-- django.config
|-- ebdjango
| |-- __init__.py
| |-- settings.py
| |-- urls.py
| `-- wsgi.py
|-- db.sqlite3
|-- manage.py
`-- requirements.txt
文件内容只有一行:
venv
关于django - eb 部署错误 - chown/var/app/staging/venv/bin/python : no such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71863456/