Hi guys!
I’m deploying a basic Streamlit app using heroku.yml, I have a frontend and a backend container, it seems my frontend container, which contains the Streamlit app build successfully, but I can’t connect to my page; I have the following error:
2021-07-17T01:16:58.506090+00:00 heroku[frontend.1]: State changed from crashed to starting
2021-07-17T01:17:08.299060+00:00 heroku[frontend.1]: Starting process with command `/bin/sh -c sh\ setup.sh\ \&\&\ streamlit\ run\ main.py`
2021-07-17T01:17:09.032809+00:00 heroku[frontend.1]: State changed from starting to up
2021-07-17T01:17:11.991734+00:00 app[frontend.1]:
2021-07-17T01:17:11.991877+00:00 app[frontend.1]: You can now view your Streamlit app in your browser.
2021-07-17T01:17:11.991991+00:00 app[frontend.1]:
2021-07-17T01:17:11.992217+00:00 app[frontend.1]: Network URL: http://172.17.174.218:48195
2021-07-17T01:17:11.992662+00:00 app[frontend.1]: External URL: http://54.92.216.239:48195
2021-07-17T01:17:11.992740+00:00 app[frontend.1]:
2021-07-17T01:17:54.639004+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=whispering-peak-59110.herokuapp.com request_id=04f89763-d4e5-412b-ba30-741479b1d2fb fwd="179.6.198.77" dyno= connect= service= status=503 bytes= protocol=https
2021-07-17T01:17:56.493688+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=whispering-peak-59110.herokuapp.com request_id=7badf917-3d43-49d0-9b20-6705bab25a4e fwd="179.6.198.77" dyno= connect= service= status=503 bytes= protocol=https
This is my streamlit container:
FROM python:3.8-slim
COPY requirements.txt .
RUN pip install -r requirements.txt
EXPOSE $PORT
COPY . .
CMD sh setup.sh && streamlit run main.py
My setup file :
mkdir -p ~/.streamlit/
echo "\
[server]\n\
headless = true\n\
port = $PORT\n\
enableCORS = false\n\
enableXsrfProtection = false\n\
\n\
" > ~/.streamlit/config.toml
and finally my heroku.yml. First, I’m trying to deploy the frontend container, then my backend container.
build:
docker:
frontend: frontend/Dockerfile
I don’t know where is the error in the code; I really appreciate any help.
Thanks