配置文件 Heroku
Procfile Heroku
我尝试在 Heroku 上部署我的第一个 Telegram 聊天机器人(使用 Chatterbot 库完成)。我的聊天机器人的文件是:
要求(txt文件)
Procfile(工人:python magghybot.py)
僵尸用户(csv 文件)
玛吉(py文件)
magghybot(py 文件)
运行时(txt 文件)
电报令牌(txt 文件)
对话(名为 lang 的文件夹中的 yml 文件)
math_words(json 文件夹中名为 lang 的文件)
当我尝试通过终端部署时,我得到了这个结果:
Counting objects: 14, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (14/14), 5.27 KiB | 0 bytes/s, done.
Total 14 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: ! Warning: Your application is missing a Procfile. This file tells Heroku how to run your application.
remote: ! Learn more: https://devcenter.heroku.com/articles/procfile
remote: -----> Installing python-2.7.14
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote: Collecting altgraph==0.10.2 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 1))
remote: Downloading altgraph-0.10.2.tar.gz (481kB)
remote: Collecting backports.shutil-get-terminal-size==1.0.0 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 2))
remote: Downloading backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl
remote: Collecting bdist-mpkg==0.5.0 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 3))
remote: Downloading bdist_mpkg-0.5.0.tar.gz
remote: Collecting bonjour-py==0.3 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 4))
remote: Could not find a version that satisfies the requirement bonjour-py==0.3 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 4)) (from versions: )
remote: No matching distribution found for bonjour-py==0.3 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 4))
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to magghy.
remote:
To https://git.heroku.com/magghy.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/magghy.git'
拜托,你能帮帮我吗?我已经创建了一个只有这个字符串的 Procfile:
worker: python magghybot.py
我用命令touch Procfile
解决了。这个命令创建了一个没有扩展名的文件,所以我把我的字符串 worker: python magghybot.py
。 :)
我尝试在 Heroku 上部署我的第一个 Telegram 聊天机器人(使用 Chatterbot 库完成)。我的聊天机器人的文件是: 要求(txt文件) Procfile(工人:python magghybot.py) 僵尸用户(csv 文件) 玛吉(py文件) magghybot(py 文件) 运行时(txt 文件) 电报令牌(txt 文件) 对话(名为 lang 的文件夹中的 yml 文件) math_words(json 文件夹中名为 lang 的文件)
当我尝试通过终端部署时,我得到了这个结果:
Counting objects: 14, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (14/14), 5.27 KiB | 0 bytes/s, done.
Total 14 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: ! Warning: Your application is missing a Procfile. This file tells Heroku how to run your application.
remote: ! Learn more: https://devcenter.heroku.com/articles/procfile
remote: -----> Installing python-2.7.14
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote: Collecting altgraph==0.10.2 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 1))
remote: Downloading altgraph-0.10.2.tar.gz (481kB)
remote: Collecting backports.shutil-get-terminal-size==1.0.0 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 2))
remote: Downloading backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl
remote: Collecting bdist-mpkg==0.5.0 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 3))
remote: Downloading bdist_mpkg-0.5.0.tar.gz
remote: Collecting bonjour-py==0.3 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 4))
remote: Could not find a version that satisfies the requirement bonjour-py==0.3 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 4)) (from versions: )
remote: No matching distribution found for bonjour-py==0.3 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 4))
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to magghy.
remote:
To https://git.heroku.com/magghy.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/magghy.git'
拜托,你能帮帮我吗?我已经创建了一个只有这个字符串的 Procfile:
worker: python magghybot.py
我用命令touch Procfile
解决了。这个命令创建了一个没有扩展名的文件,所以我把我的字符串 worker: python magghybot.py
。 :)