restart python app on openshift doesn't reload environment variables

牧云@^-^@ 提交于 2019-12-24 05:10:10

问题


I'm trying reload my application on Openshift and having some problems. Don't matter if run rhc app restart or rhc app reload to restart/reload the application, my environment variables aren't reloaded.

Then, to solve the problem, I'm forced to stop and start the application.

PS: Cartridge: python-2.7 Framework: Django


回答1:


You also have to do:

$ rhc app stop -a appname
$ rhc app start -a appname

instead of restart or reload.

See https://bugzilla.redhat.com/show_bug.cgi?id=1104955#c15




回答2:


Are you setting the environment variables via the rhc env set command? Or using action hooks? I suggest using the rhc env set command, as they will persist correctly between restarts etc.



来源:https://stackoverflow.com/questions/22438662/restart-python-app-on-openshift-doesnt-reload-environment-variables

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!