Skip to content

Commit 566e8e7

Browse files
committed
fix
1 parent d0a8099 commit 566e8e7

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

Dockerfile

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
11
FROM python:3.11-slim
22

3-
# Install gcc and other necessary development tools
43
RUN apt update && apt install -y gcc build-essential
54

6-
# Set the working directory
75
WORKDIR /app
86

9-
# Copy the requirements file to the container
107
COPY requirements.txt .
118

12-
# Install the required dependencies
139
RUN pip install --no-cache-dir -r requirements.txt
1410

15-
# Copy the entire project into the container
1611
COPY . .
1712

18-
# Expose port 8000 for FastAPI
1913
EXPOSE 8000
2014

21-
# Install Gunicorn
22-
RUN pip install gunicorn
23-
24-
# Default command to run FastAPI using Gunicorn
25-
CMD ["gunicorn", "src.main:app", "--workers", "4", "--worker-class", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:8000"]
15+
CMD ["fastapi", "run", "src"]

0 commit comments

Comments
 (0)