Spaces:
Running
Running
File size: 806 Bytes
06c7e61 |
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 27 28 29 30 31 32 33 |
# Usa l'immagine base di Python
FROM python:3.12-slim
# Installa git e certificati SSL
RUN apt-get update && apt-get install -y \
git \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Imposta la directory di lavoro
WORKDIR /app
# Clona il repository GitHub
RUN git clone https://github.com/nzo66/tvproxy .
# Installa le dipendenze
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Espone la porta 7860 per Flask/Gunicorn
EXPOSE 7860
# Comando ottimizzato per avviare il server
CMD ["gunicorn", "app:app", \
"-w", "4", \
"--worker-class", "gevent", \
"--worker-connections", "100", \
"-b", "0.0.0.0:7860", \
"--timeout", "120", \
"--keep-alive", "5", \
"--max-requests", "1000", \
"--max-requests-jitter", "100"]
|