piyushnaula commited on
Commit
ad005a9
·
1 Parent(s): 0a7262f

Configure deployment for Backend API (FastAPI)

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. start.sh +9 -0
Dockerfile CHANGED
@@ -27,4 +27,4 @@ COPY . .
27
  EXPOSE 7860
28
 
29
  # Run FastAPI on port 7860
30
- CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.headless=true"]
 
27
  EXPOSE 7860
28
 
29
  # Run FastAPI on port 7860
30
+ CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "7860"]
start.sh ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Start FastAPI backend in the background on port 8000
4
+ echo "Starting FastAPI backend..."
5
+ uvicorn src.main:app --host 0.0.0.0 --port 8000 &
6
+
7
+ # Start Streamlit frontend in the foreground on port 7860
8
+ echo "Starting Streamlit frontend..."
9
+ streamlit run app.py --server.port=7860 --server.address=0.0.0.0 --server.headless=true