version: '3.8'

services:
  linkedin-posts:
    build: .
    container_name: linkedin-posts
    restart: unless-stopped
    ports:
      - "127.0.0.1:8001:8001"  # Nur lokal erreichbar
    env_file:
      - .env
    environment:
      - PYTHONPATH=/app
      - PORT=8001
    volumes:
      - ./logs:/app/logs
    healthcheck:
      test: ["CMD", "python", "-c", "import httpx; httpx.get('http://localhost:8001/login', timeout=5)"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 10s
