rkihacker commited on
Commit
3ede8fd
·
verified ·
1 Parent(s): 3aa35cf

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -11,10 +11,11 @@ COPY requirements.txt .
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
  # Copy the rest of the application code
14
- COPY . .
15
 
16
  # Expose the port the app runs on
17
  EXPOSE 5000
18
 
19
- # Command to run the application
20
- CMD ["python", "main.py"]
 
 
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
  # Copy the rest of the application code
14
+ COPY main.py .
15
 
16
  # Expose the port the app runs on
17
  EXPOSE 5000
18
 
19
+ # Command to run the Uvicorn server for production
20
+ # We use main:app to specify the file (main.py) and the FastAPI instance (app)
21
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5000"]