Can't access my Streamlit application over HTTP

milescarberryPRO

9 months ago

I am not able to access my streamlit application over HTTP.

Here's the deploy logs:

Collecting usage statistics. To deactivate, set browser.gatherUsageStats to false.

Aug 03 16:30:54

You can now view your Streamlit app in your browser.

Aug 03 16:30:54

URL: http://0.0.0.0:8501

Dockerfile:

# Use the official Python image from the Docker Hub

FROM python:3.11.4

# Set the working directory for the app

WORKDIR /app

# Copy the requirements.txt file to the working directory

COPY requirements.txt .

# Install the dependencies specified in requirements.txt

RUN pip3 install --no-cache-dir -r requirements.txt

# Copy the rest of the application's code to the working directory

COPY . .

EXPOSE 8501

HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health

ENTRYPOINT ["streamlit", "run", "payment_status.py", "--server.port=8501", "--server.address=0.0.0.0"]

The Error Message Displayed While Accessing the HTTP Address:

Application failed to respond

This error appears to be caused by the application.

If this is your project, check out your deploy logs to see what went wrong. Refer to our docs on Fixing Common Errors for help, or reach out over our Help Station.

If you are a visitor, please contact the application owner or try again later.

Request ID:
ogohsjD8SPCmmUPmwZJJ7Q_1721921752

My App's URL:

https://payment-success-fasttatkal.up.railway.app/

Please help me out.

Solved

3 Replies

9 months ago

Hello,

Please read this docs page -

https://docs.railway.app/guides/fixing-common-errors


Status changed to Awaiting User Response railway[bot] 9 months ago


milescarberryPRO

9 months ago

I have changed the Dockerfile to this:

FROM python:3.11.4

# Set the working directory for the app

WORKDIR /app

# Copy the requirements.txt file to the working directory

COPY requirements.txt .

# Install the dependencies specified in requirements.txt

RUN pip3 install --no-cache-dir -r requirements.txt

# Copy the rest of the application's code to the working directory

COPY . .

EXPOSE 8501

HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health

ENTRYPOINT ["streamlit", "run", "payment_status.py", "--server.port $PORT", "--server.address 0.0.0.0", "--browser.gatherUsageStats false", "--server.fileWatcherType none"]

But, I am still getting this error:

Error: No such option: --server.port $PORT (Possible options: --server.cookieSecret, --server.port)

Please help me out


Status changed to Awaiting Railway Response railway[bot] 9 months ago


milescarberryPRO

9 months ago

Solved the issue. I went through this article: https://medium.com/@calebdame/hosting-streamlit-web-apps-on-railway-app-8344a006405e and deployed the app using nixpacks. Thank you for your help.


Status changed to Solved brody 9 months ago