Add a dockerfile
This commit is contained in:
parent
b9bad3d284
commit
c702d99d26
20
backend/Dockerfile
Normal file
20
backend/Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
# Use the official Python image from the Docker Hub
|
||||
FROM python:3.9-slim
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the pyproject.toml file to the container
|
||||
COPY pyproject.toml ./
|
||||
|
||||
# Install the dependencies using pyproject.toml
|
||||
RUN pip install --no-cache-dir .
|
||||
|
||||
# Copy the rest of the application code to the container
|
||||
COPY . .
|
||||
|
||||
# Expose the port the app runs on
|
||||
EXPOSE 8000
|
||||
|
||||
# Command to run the application
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
@ -1,3 +0,0 @@
|
||||
fastapi
|
||||
pydantic
|
||||
uvicorn
|
||||
Loading…
x
Reference in New Issue
Block a user