-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.simple
More file actions
38 lines (28 loc) · 1.05 KB
/
Copy pathDockerfile.simple
File metadata and controls
38 lines (28 loc) · 1.05 KB
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
34
35
36
37
38
# Dockerfile Semplificato (solo scraper base, senza Selenium)
# Usa questo se non hai bisogno dello scraper avanzato con JavaScript
FROM python:3.11-slim
# Installa solo le dipendenze minime
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*
# Imposta la directory di lavoro
WORKDIR /app
# Copia i file requirements
COPY requirements.txt .
COPY requirements-web.txt .
# Installa le dipendenze Python (senza selenium)
RUN pip install --no-cache-dir requests beautifulsoup4 lxml pandas python-dotenv tenacity html5lib openpyxl streamlit xlsxwriter
# Copia il codice dell'applicazione
COPY scraper_base.py .
COPY app.py .
# Crea directory per i risultati
RUN mkdir -p results
# Espone la porta di Streamlit
EXPOSE 8501
# Variabili d'ambiente per Streamlit
ENV STREAMLIT_SERVER_PORT=8501
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
ENV STREAMLIT_SERVER_HEADLESS=true
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
# Comando per avviare l'applicazione
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]