Serve a Bottle application from gunicorn on Heroku?

你离开我真会死。 提交于 2019-12-24 02:56:21

问题


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)

heroku[router]: at=error code=H14 desc="No web processes running"


回答1:


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.



来源:https://stackoverflow.com/questions/17556082/serve-a-bottle-application-from-gunicorn-on-heroku

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