Files
lovdata-chat/session-manager/Dockerfile

31 lines
670 B
Docker

FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
docker.io \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY session-manager/requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY session-manager/ .
# Create sessions directory
RUN mkdir -p /app/sessions
# Expose port
EXPOSE 8000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1
# Start the session manager
CMD ["python", "main.py"]