docs4you commited on
Commit
5357099
·
verified ·
1 Parent(s): 9719d3c

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -0
Dockerfile ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ COPY . .
16
+
17
+ # Installa le dipendenze
18
+ RUN pip install --upgrade pip
19
+ RUN pip install --no-cache-dir -r requirements.txt
20
+
21
+ # Espone la porta 7860 per Flask/Gunicorn
22
+ EXPOSE 7860
23
+
24
+ # Comando ottimizzato per avviare il server
25
+ CMD ["gunicorn", "app:app", \
26
+ "-w", "4", \
27
+ "--worker-class", "gevent", \
28
+ "--worker-connections", "100", \
29
+ "-b", "0.0.0.0:7860", \
30
+ "--timeout", "120", \
31
+ "--keep-alive", "5", \
32
+ "--max-requests", "1000", \
33
+ "--max-requests-jitter", "100"]