complycore/backend/Dockerfile

22 lines
565 B
Docker

# Use official lightweight Python image
FROM python:3.11-slim
# Set working directory inside container
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y gcc libpq-dev curl && rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Expose port for internal use (not mapped publicly unless via NGINX)
EXPOSE 8000
# Run the FastAPI app with Uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]