version: '3.8'

services:
  crypto-collector:
    build: .
    container_name: crypto-collector
    restart: unless-stopped
    volumes:
      # Data directory - persistent storage
      - ./data:/var/www/html/crypto
      # Configuration file (optional override)
      - ./config.py:/app/config.py:ro
    environment:
      - TZ=UTC
    network_mode: "host"
    command: python3 multi_coin_collector.py
    healthcheck:
      test: ["CMD", "pgrep", "-f", "multi_coin_collector.py"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 10s
