Skip to content

Commit 8740ce8

Browse files
authored
Dockerfile req
1 parent e2bbcad commit 8740ce8

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

dockerbuild

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use the official Python image as base
2+
FROM python:3.11-slim
3+
4+
# Set working directory
5+
WORKDIR /app
6+
7+
# Copy requirements file and install dependencies
8+
COPY requirements.txt .
9+
RUN pip install --no-cache-dir -r requirements.txt
10+
11+
# Copy the FastAPI application
12+
COPY . .
13+
14+
# Expose the port FastAPI will run on
15+
EXPOSE 8000
16+
17+
# Command to run the app using uvicorn
18+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
19+
20+
fastapi
21+
uvicorn
22+
passlib[bcrypt]

0 commit comments

Comments
 (0)