- #12: Remove duplicate logging.basicConfig() from 10 modules - #15: Remove redundant import re in rebuild_database.py - #17: rglob('*') → rglob('*.html/json/txt/xml/md') for speed - #18: Dockerfile individual COPY → glob COPY *.py/*.json + .dockerignore - #19: Remove deprecated docker-compose version field - #20: Pin requirements.txt versions (flask, requests, etc.) - #22: SIGALRM → threading.Timer for multi-threaded safety - #23: AP regex parsing → BeautifulSoup selectors
22 lines
445 B
YAML
22 lines
445 B
YAML
services:
|
|
newsarchiver:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: newsarchiver
|
|
ports:
|
|
- "5000:5000"
|
|
environment:
|
|
- ARCHIVE_DIR=/data/archives
|
|
volumes:
|
|
- newsarchiver_data:/data/archives
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:5000/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
volumes:
|
|
newsarchiver_data:
|