# Streamlit, FastAPI Deployment Issue

**URL:** <https://discuss.huggingface.co/t/streamlit-fastapi-deployment-issue/86217>\
**Category:** Beginners\
**Created:** [May 11, 2024, 8:02am UTC](https://discuss.huggingface.co/t/streamlit-fastapi-deployment-issue/86217 "2024-05-11T08:02:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aminaj](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@aminaj](https://discuss.huggingface.co/u/aminaj)\
**Post date:** [May 11, 2024, 8:02am UTC](https://discuss.huggingface.co/t/streamlit-fastapi-deployment-issue/86217/1 "2024-05-11T08:02:38Z")

</div>

Hi,

I am trying to deploy my application on Hugging Face with a FastAPI backend and Streamlit frontend. The application is containerized using Docker. The issue is that my Streamlit frontend is not launched when I run the application although the app works fine on my local system.

I am using the following command in my Dockerfile:

# Expose the port that the application listens on.

EXPOSE 7860

# Run the application.

CMD [“bash”, “-c”, “uvicorn main:app --host 0.0.0.0 --port 7860 & streamlit run myapp.py --server.port 8501”]

Can someone guide me how to troubleshoot this issue?

---

<div class="post-metadata">

**Author:** ![kidcoconut](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/kidcoconut/32/28896_2.png) [@kidcoconut](https://discuss.huggingface.co/u/kidcoconut)\
**Post date:** [July 2, 2024, 4:40am UTC](https://discuss.huggingface.co/t/streamlit-fastapi-deployment-issue/86217/2 "2024-07-02T04:40:19Z")

</div>

Hi there,  
I have run into a similar issue but may be a little ahead of you. I have posted something similar at:  
[deploying-nginx-in-docker-with-streamlit-and-fastapi](https://discuss.huggingface.co/t/deploying-nginx-in-docker-with-streamlit-and-fastapi/95068)

A few tips:

- It would help to post a link to your public project.
- you will need to implement a reverse proxy like nginx to expose multiple services through docker. This is exactly what I am trying to do
- instead of running the applications through a single CMD; try to use an ENDPOINT script. My project provides an example.

Good luck!
