-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (41 loc) · 1.07 KB
/
Copy pathdocker-compose.yml
File metadata and controls
43 lines (41 loc) · 1.07 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
39
40
41
42
43
version: '3.8'
services:
web-scraper:
build: .
container_name: web-scraper-dashboard
ports:
- "8501:8501"
volumes:
# Monta la directory results per persistere i dati
- ./results:/app/results
# Monta i file di configurazione (opzionale)
- ./configs:/app/configs
environment:
- STREAMLIT_SERVER_PORT=8501
- STREAMLIT_SERVER_ADDRESS=0.0.0.0
- STREAMLIT_SERVER_HEADLESS=true
- STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
# Configurazioni Chrome per Docker
- CHROME_BIN=/usr/bin/google-chrome
- CHROMEDRIVER_PATH=/usr/local/bin/chromedriver
restart: unless-stopped
networks:
- scraper-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8501/_stcore/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Limiti di risorse (opzionale)
deploy:
resources:
limits:
cpus: '2'
memory: 2G
reservations:
cpus: '1'
memory: 1G
networks:
scraper-network:
driver: bridge