27 lines
525 B
Docker
27 lines
525 B
Docker
# Dockerfile
|
|
FROM python:3.12-slim
|
|
|
|
# Set environment variables
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
# Set working directory
|
|
WORKDIR /cost-assistant
|
|
|
|
# Copy requirements first (for caching)
|
|
COPY requirements.txt .
|
|
|
|
# Install dependencies
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy the project files
|
|
COPY . .
|
|
|
|
# Create upload folder
|
|
RUN mkdir -p data/uploads
|
|
|
|
# Expose port
|
|
EXPOSE 8000
|
|
|
|
# Run FastAPI with Uvicorn
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
|