# Streamlit, FastAPI Deployment Issue

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fstreamlit-fastapi-deployment-issue%2F86217%3E%5C
**Category:** Beginners\
**Created:** [May 11, 2024, 8:02am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fstreamlit-fastapi-deployment-issue%2F86217 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Faminaj)%5C
**Post date:** [May 11, 2024, 8:02am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fstreamlit-fastapi-deployment-issue%2F86217%2F1 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fkidcoconut)%5C
**Post date:** [July 2, 2024, 4:40am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fstreamlit-fastapi-deployment-issue%2F86217%2F2 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdeploying-nginx-in-docker-with-streamlit-and-fastapi%2F95068)

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!
