如何在Python 3.3盒式磁带中更改或覆盖openshift.conf [英] How to change or override openshift.conf in Python 3.3 cartridge
问题描述
我想在OpenShift上部署一个开源项目,但我没有编写该应用程序. Openshift似乎很难编码,可以在此处查找wsgi脚本:
I want to deploy an open source project on OpenShift, I did not write the application. Openshift seems hard coded to look for the wsgi script here:
WSGIScriptAlias/"/var/lib/openshift/5320e280e0b8cd9e9a000362/app-root/runtime/repo/wsgi/application"
WSGIScriptAlias / "/var/lib/openshift/5320e280e0b8cd9e9a000362/app-root/runtime/repo/wsgi/application"
在重新加载或重新启动盒式磁带时,所有尝试更改openshift.conf的尝试都会被清除.
any attempt to change openshift.conf gets wiped out when the cartridge reloads or restarts.
我需要此指令为
WSGIScriptAlias/"/var/lib/openshift/5320e280e0b8cd9e9a000362/app-root/runtime/repo/myapp/wsgi.py"
WSGIScriptAlias / "/var/lib/openshift/5320e280e0b8cd9e9a000362/app-root/runtime/repo/myapp/wsgi.py"
我宁愿不必破解应用程序,也不必担心将来上游的变化.必须是更改此设置的一种方法,但是我花了数小时搜索无济于事.
I prefer not to have to hack the app, I don't want to have to worry about future changes upstream. The must be a way to change this setting but I've spent hours searching to no avail.
推荐答案
查看此发行博客,其中解释了如何使用OPENSHIFT_PYTHON_WSGI_APPLICATION
环境变量来更改您的wsgi入口点:
Check out this release blog which explains how to use the OPENSHIFT_PYTHON_WSGI_APPLICATION
environment variable to change your wsgi entry point: https://www.openshift.com/blogs/openshift-online-march-2014-release-blog
这篇关于如何在Python 3.3盒式磁带中更改或覆盖openshift.conf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!