20 lines
515 B
Docker
20 lines
515 B
Docker
# Use the official Python image as the base image
|
|
FROM python:3.11-slim
|
|
|
|
# Set the working directory in the container
|
|
WORKDIR /app
|
|
|
|
# Copy the application files into the container
|
|
COPY . /app
|
|
|
|
# Install Poetry for dependency management
|
|
RUN pip install --no-cache-dir uv
|
|
RUN uv sync --locked --all-extras --dev --deploy
|
|
|
|
|
|
# Expose the port the app runs on
|
|
EXPOSE 5001
|
|
|
|
# Set the default command to run the application using uvicorn
|
|
CMD ["uv", "run", "uvicorn", "src.app:app", "--host", "0.0.0.0", "--port", "5001"]
|