NickH01 commited on
Commit
38d7b4b
·
verified ·
1 Parent(s): 8f82611

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -7
Dockerfile CHANGED
@@ -1,13 +1,23 @@
1
- FROM python:3.10-slim-buster
 
2
 
3
- WORKDIR /app
 
 
4
 
5
- RUN apt-get update && apt-get install -y git
 
 
6
 
7
- RUN git clone https://github.com/californinson/StreamGuard.git .
8
-
9
- RUN pip install --no-cache-dir -r requirements.txt
 
10
 
 
11
  EXPOSE 7860
12
 
13
- CMD ["uvicorn", "run:main_app", "--host", "0.0.0.0", "--port", "7860", "--workers", "4"]
 
 
 
 
1
+ # Dockerfile
2
+ FROM python:3.11-slim
3
 
4
+ # Dipendenze base
5
+ RUN apt-get update && apt-get install -y --no-install-recommends \
6
+ ca-certificates curl && rm -rf /var/lib/apt/lists/*
7
 
8
+ # Installa MediaFlow Proxy
9
+ # (puoi fissare una versione specifica, es. ==2.1.2)
10
+ RUN pip install --no-cache-dir mediaflow-proxy
11
 
12
+ # Vars: Spaces espone $PORT; tu imposti sicurezza e trust dei proxy
13
+ ENV PORT=7860 \
14
+ API_PASSWORD=Aipued6m \
15
+ FORWARDED_ALLOW_IPS="*"
16
 
17
+ # Espone la porta attesa da Spaces
18
  EXPOSE 7860
19
 
20
+ # Avvia FastAPI su $PORT
21
+ CMD uvicorn mediaflow_proxy.main:app \
22
+ --host 0.0.0.0 --port ${PORT} --workers 2 \
23
+ --forwarded-allow-ips "*"