fmdelgado / drugrepochat

chatting with D2.1 documentation
0 stars 0 forks source link

Docker image not running #2

Open fmdelgado opened 1 year ago

fmdelgado commented 1 year ago

The Streamlit application inside a Docker container is not running or the port is not working, there could be several potential issues at play. @AndiMajore could you please have a look at these potential solutions just to be completely sure it's not a code problem? Mahdi told me about the port 8501 by default so maybe it's about this.

  1. Expose the Correct Port: Make sure to expose the port that Streamlit is running on (by default, it's 8501). In your Dockerfile, add the following line:

    EXPOSE 8501
  2. Run the Docker Container with Port Mapping: When running the Docker container, map the internal port to an external port using the -p flag:

    docker run -p 8501:8501 your_image_name
  3. Configure Streamlit for Network Access: If the app is still not accessible, it might be related to Streamlit's networking configuration. You can set the --server.address parameter to 0.0.0.0 to allow connections from outside the container:

    CMD streamlit run --server.address 0.0.0.0 app.py
  4. Check for Errors: Look at the Docker container logs to check for any errors:

    docker logs your_container_id
  5. Firewall and Security Rules: Ensure that there are no firewall or security rules blocking access to the port you're using. 1.Check the Browser and URL: Try accessing the app using different browsers or ensure that you are accessing the correct URL, typically http://localhost:8501.

AndiMajore commented 1 year ago

The docker container works locally, so I doubt that it is 1. or 2., that should already be done.

  1. There might be an idea, I'll check
  2. I need some debug mode for that because there is no logs coming out.
  3. Maybe, but also unlikely

My main suspicion is that the web-socket connection does not work bc of some missing config of the apache server.