- Add docker-publish.yml workflow for ghcr.io - Add production-ready Dockerfile (if missing) - Enable automated builds on push to main - Support for semantic versioning tags
30 lines
629 B
Docker
30 lines
629 B
Docker
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
gcc \
|
|
python3-dev \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy and install Python dependencies
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY . .
|
|
|
|
# Create directories
|
|
RUN mkdir -p /app/logs /app/data
|
|
|
|
# Environment
|
|
ENV LITELLM_MASTER_KEY=${LITELLM_MASTER_KEY}
|
|
ENV DATABASE_URL=${DATABASE_URL}
|
|
ENV REDIS_URL=${REDIS_URL}
|
|
|
|
EXPOSE 4000
|
|
|
|
# Run LiteLLM proxy
|
|
CMD ["litellm", "--config", "/app/config.yaml", "--port", "4000", "--num_workers", "1"] |