How to change or override openshift.conf in Python

2019-06-07 04:40发布

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"

any attempt to change openshift.conf gets wiped out when the cartridge reloads or restarts.

I need this directive to be

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.

1条回答
小情绪 Triste *
2楼-- · 2019-06-07 05:26

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

查看更多
登录 后发表回答