mikmc5 commited on
Commit
db18de0
·
verified ·
1 Parent(s): 77832f3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -7
Dockerfile CHANGED
@@ -1,20 +1,20 @@
1
- # Use the official Python base image
2
  FROM python:3.9-slim
3
 
4
- # Set the working directory inside the container
5
  WORKDIR /app
6
 
7
- # Copy the requirements file to the working directory
8
  COPY requirements.txt .
9
 
10
- # Install dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Copy the application content to the working directory
14
  COPY . .
15
 
16
- # Expose the port on which the application will run (FastAPI default is 8000)
17
  EXPOSE 8000
18
 
19
- # Start the application using Gunicorn
20
  CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:8000", "--log-level", "debug", "--access-logfile", "-"]
 
1
+ # Use the official Python 3.9 slim image
2
  FROM python:3.9-slim
3
 
4
+ # Set the working directory in the container
5
  WORKDIR /app
6
 
7
+ # Copy the requirements.txt file into the container
8
  COPY requirements.txt .
9
 
10
+ # Install the dependencies specified in requirements.txt
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Copy the entire application code into the container
14
  COPY . .
15
 
16
+ # Expose the port that FastAPI will use
17
  EXPOSE 8000
18
 
19
+ # Start the FastAPI app with Gunicorn for better performance
20
  CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:8000", "--log-level", "debug", "--access-logfile", "-"]