File size: 653 Bytes
1d8729f
 
 
 
1fff71f
1d8729f
 
 
 
1fff71f
 
dc4561e
1d8729f
1fff71f
dc4561e
1d8729f
1fff71f
1d8729f
dc4561e
1fff71f
 
 
dc4561e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM python:3.11-slim

WORKDIR /app

RUN apt-get update && apt-get install -y build-essential && rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY src/ src/
COPY migrations/ migrations/
COPY entrypoint.sh /app/entrypoint.sh

RUN mkdir -p data
RUN chmod +x /app/entrypoint.sh

EXPOSE 7860

# Use entrypoint script to run migrations before starting Gunicorn
# Run with single worker to fix OAuth session persistence
# TODO: Implement server-side session storage (Redis/Memcached) for multi-worker support
# Increase timeout to 120s to handle slow LLM responses
ENTRYPOINT ["/app/entrypoint.sh"]