services:
  vavoo-m3u-generator:
    image: python:3.9-slim
    container_name: vavoo-m3u
    restart: unless-stopped
    networks:
      - proxy
    working_dir: /app
    volumes:
      - /home/philipp/raid/vavoo:/app/VavooGen
    # Installiere wget und führe das Skript aus
    command: >
      sh -c "
      apt-get update &&
      apt-get install -y wget &&
      pip install requests &&
      wget -O /app/Vavoo_m3u.py https://raw.githubusercontent.com/scara78/Vavoo-m3u/main/Vavoo_m3u.py &&
      python /app/Vavoo_m3u.py &&
      python -m http.server 8000 --directory /app/VavooGen
      "
    ports:
      - "8300:8000"

networks:
  proxy:
    external: true
