本文介绍了从Heric的gunicorn服务瓶应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
procfile
web:python server.py
server.py
from os import environ
from bottle import app,route,run,static_file
@route('/')
def root():
returnHello world!
$ b $ if if __name__ =='__main__':
run(server ='gunicorn',host ='0.0.0.0',port = int(environ.get(PORT,5000) ))
requirements.txt
gunicorn
psycopg2
git + https://github.com/defnull/bottle#egg=bottle
日志文件的相关部分(位于
git push $ b
解决方案首先:您确定这些是所有 ?
如果他们是,你确定你有任何分配的dynos吗?什么是
heroku ps
的结果? H14被列为通常不会被设置为运行您的应用程序的动态引擎。
您可以将它设置为使用一个带有
heroku ps :scale web = 1
。Procfile
web: python server.py
server.py
from os import environ from bottle import app, route, run, static_file @route('/') def root(): return "Hello world!" if __name__ == '__main__': run(server='gunicorn', host='0.0.0.0', port=int(environ.get("PORT", 5000)))
requirements.txt
gunicorn psycopg2 git+https://github.com/defnull/bottle#egg=bottle
Relevant portion of logfile (after
git push
)解决方案First of all: Are you certain that those are all of the necessary requirements?
If they are, are you sure you have any dynos allocated? What's the result of
heroku ps
? H14 is listed as usually being caused by having no dynos set to run your app.You can set it to use one web dyno with
heroku ps:scale web=1
.这篇关于从Heric的gunicorn服务瓶应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!