File size: 652 Bytes
038b80c
 
 
 
8664c41
 
 
038b80c
bf896e2
 
 
038b80c
8664c41
bf896e2
038b80c
8664c41
bf896e2
8664c41
038b80c
 
bf896e2
038b80c
 
 
bf896e2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM python:3.11-slim

WORKDIR /app

# 1) Install OS + Python deps
RUN apt-get update && apt-get install -y gcc \
 && rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN pip install --upgrade pip \
 && pip install -r requirements.txt

# 2) Copy your application (creates /app/chats if it's in your repo)
COPY . /app

# 3) Ensure runtime dirs exist & are writable
RUN mkdir -p /app/cache /app/uploads /app/data /app/chats \
 && chmod -R 777 /app/cache /app/uploads /app/data /app/chats

ENV FLASK_APP=app.py \
    FLASK_ENV=production

EXPOSE 7860

CMD ["gunicorn", "-k", "eventlet", "-w", "1", "-b", "0.0.0.0:7860", "--timeout", "600", "app:app"]