23 lines
434 B
Docker
23 lines
434 B
Docker
# Use official Python base image
|
|
FROM python:3.11-slim
|
|
|
|
# Set environment variables
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy requirements file
|
|
COPY requirements.txt .
|
|
|
|
# Install dependencies
|
|
RUN pip install --upgrade pip && pip install -r requirements.txt
|
|
|
|
# Copy the rest of the app
|
|
COPY . .
|
|
|
|
# Expose port (change if needed)
|
|
EXPOSE 8000
|
|
|
|
# Run the application
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|