Openshift在推送时不执行syncdb

2024-06-07 01:31:59 发布

您现在位置:Python中文网/ 问答频道 /正文

在执行推送和重新启动应用程序时出现以下错误:

remote: Executing 'python /var/lib/openshift/6783687678687678/app-root/runtime/repo//wsgi/openshift/manage.py syncdb --noinput' 

remote: python: can't open file '/var/lib/openshift/6783687678687678/app-root/runtime/repo/wsgi/openshift/manage.py': [Errno 2] No such file or directory

然而,这不是我的应用程序的路径。我无法找到设置的位置,以便将它们更改为实际路径。我试过:setup.py, settings, application但这些似乎都与上述路径无关。路径应为:

/var/lib/openshift/6783687678687678/app-root/runtime/repo/wsgi/mycoolapp/manage.py'

如果我在action\u hooks(即deploy)中更改路径,我会得到以下结果:

Executing 'python /var/lib/openshift/6783687678687678/app-root/runtime/repo//wsgi/app/manage.py collectstatic --noinput'
remote: Traceback (most recent call last):
remote:   File "/var/lib/app/6783687678687678/app-root/runtime/repo/wsgi/app/manage.py", line 2, in <module>
remote:     from django.core.management import execute_manager
remote: ImportError: cannot import name execute_manager

Tags: py路径app应用程序wsgimanageremotevar
1条回答
网友
1楼 · 发布于 2024-06-07 01:31:59

cartridge docs

For backward compatibility, the wsgi/application path is selected as default WSGI entry-point > with higher priority. You can customize the path using the OPENSHIFT_PYTHON_WSGI_APPLICATION > environment variable.

但是看起来您的应用程序的路径是正确的,因此,我将检查您在~/.openshift/action_hooks/下的repo中的操作挂钩,以查看是否定义了一些自定义操作。你知道吗

相关问题 更多 >