poppy89 commited on
Commit
63a32d8
·
verified ·
1 Parent(s): 811a45f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -0
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Usa l'immagine base di Python
2
+ FROM python:3.12-slim
3
+
4
+ # Installa git e certificati SSL
5
+ RUN apt-get update && apt-get install -y \
6
+ git \
7
+ ca-certificates \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Imposta la directory di lavoro
11
+ WORKDIR /app
12
+
13
+ # Clona il repository GitHub
14
+ RUN git clone https://github.com/nzo66/tvproxy .
15
+
16
+ # Installa le dipendenze
17
+ RUN pip install --upgrade pip
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ # Espone la porta 7860 per Flask/Gunicorn
21
+ EXPOSE 7860
22
+
23
+ # Comando ottimizzato per avviare il server
24
+ CMD ["gunicorn", "app:app", \
25
+ "-w", "4", \
26
+ "--worker-class", "gevent", \
27
+ "--worker-connections", "100", \
28
+ "-b", "0.0.0.0:7860", \
29
+ "--timeout", "120", \
30
+ "--keep-alive", "5", \
31
+ "--max-requests", "1000", \
32
+ "--max-requests-jitter", "100"]