mcfc commited on
Commit
657ebec
·
verified ·
1 Parent(s): 07cdc64

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -7
Dockerfile CHANGED
@@ -1,24 +1,26 @@
1
  # Usa l'immagine base di Python
2
  FROM python:3.12-slim
3
 
 
 
 
 
 
 
4
  # Imposta la directory di lavoro
5
  WORKDIR /app
6
 
7
- # Copia i file necessari
8
- COPY requirements.txt .
9
- COPY app.py .
10
 
11
  # Installa le dipendenze
12
  RUN pip install --upgrade pip
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
- # Installa Gunicorn (se non è già in requirements.txt)
16
- RUN pip install gunicorn
17
-
18
  # Espone la porta 7860 per Flask/Gunicorn
19
  EXPOSE 7860
20
 
21
- # Comando per avviare il server Flask con Gunicorn e 4 worker
22
  CMD ["gunicorn", "app:app", \
23
  "-w", "4", \
24
  "--worker-class", "gevent", \
 
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", \