使用Heroku发布Streamlight应用程序时出现问题
这是我第一次尝试使用Streamlight或Heroku。我的应用程序使用Streamlight在本地运行,但在使用Heroku发布应用程序后尝试打开应用程序时,我遇到了以下错误: 2020-07-22T19:20:13.577096+00:00 heroku[路由器]:at=错误代码=H14 desc=“没有web进程运行”方法=GET path=“/”主机=ewan-app.herokuapp.com请求\u id=99a5e93d-8caa-458a-bf01-fae69aa46e9 fwd=“81.156.68.48”dyno=connect=service=status=503字节=protocol=https 2020-07-22T19:20:13.791262+00:00 heroku[路由器]:at=错误代码=H14 desc=“没有正在运行的web进程”方法=GET path=“/favicon.ico”主机=ewan-app.herokuapp.com请求id=e4eea2e8-4fe3-46c4-996e-0D463B36DE0 fwd=“81.156.68.48”dyno=connect=service=status=503字节=protocol=https 当我将应用程序脚本更改为以下内容时,也会发生同样的情况:使用Heroku发布Streamlight应用程序时出现问题,heroku,streamlit,Heroku,Streamlit,这是我第一次尝试使用Streamlight或Heroku。我的应用程序使用Streamlight在本地运行,但在使用Heroku发布应用程序后尝试打开应用程序时,我遇到了以下错误: 2020-07-22T19:20:13.577096+00:00 heroku[路由器]:at=错误代码=H14 desc=“没有web进程运行”方法=GET path=“/”主机=ewan-app.herokuapp.com请求\u id=99a5e93d-8caa-458a-bf01-fae69aa46e9 fw
import streamlit as st
st.write("Hello world!")
所以我猜这是因为其他的一个文件。我有requirements.txt:
streamlit==0.63.1
程序文件:
web:sh setup.sh && streamlit run app.py
setup.sh:
mkdir -p ~/.streamlit
echo "[server]
headless = true
port = $PORT
enableCORS = false
" > ~/.streamlit/config.toml
我尝试了一些我发现的不同建议,比如在Procfile中删除web:和sh之间的空间,在setup.sh中尝试了不同的布局,但到目前为止没有成功。任何建议都将不胜感激。我没有setup.sh,我有一个简单的Streamlight应用程序正在运行。 但是,我的Procfile略有不同:
web:streamlight运行--server.enableCORS false--server.port$port app.py
谢谢,这已经解决了问题。我对这一切都不熟悉,setup.sh是什么意思?这似乎是一个更好的解决方案?我找到的每个教程都用过一个。