bookli-chatbot / Dockerfile
Saad-gengini's picture
Track sqlite databases with git-lfs
9c0e185
# Base image
FROM python:3.11-slim
# 1. Install system dependencies (nginx)
RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/*
# 2. Set working directory
WORKDIR /app
# 3. Copy requirements and install dependencies
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
RUN pip install --no-cache-dir \
sentence-transformers==3.0.1
# 4. Copy your entire app into /app (not just app.py)
COPY . /app
# 5. Make sure start.sh exists and is executable
RUN chmod +x /app/start.sh
# 6. Hugging Face sets PORT automatically
ENV PORT=7860
# 7. Expose the port (useful for local testing)
EXPOSE 7860
# 8. Start your app (start.sh must keep one process in foreground)
CMD ["/app/start.sh"]