services:
  taskmate:
    build: .
    container_name: taskmate
    restart: unless-stopped
    ports:
      - "${PORT:-3000}:3000"
    volumes:
      - ./data:/app/data
      - ./backups:/app/backups
      - ./logs:/app/logs
      - ./uploads:/app/uploads
      # Laufwerke für Git-Repositories (bei Bedarf weitere hinzufügen)
      - C:/:/mnt/c
      # - D:/:/mnt/d  # Deaktiviert - Laufwerk nicht verfügbar
      # - E:/:/mnt/e  # Deaktiviert - Laufwerk nicht verfügbar
    environment:
      - NODE_ENV=production
      - JWT_SECRET=${JWT_SECRET}
      - SESSION_TIMEOUT=${SESSION_TIMEOUT:-30}
      - BACKUP_ENABLED=${BACKUP_ENABLED:-true}
      - BACKUP_INTERVAL_HOURS=${BACKUP_INTERVAL_HOURS:-24}
      - MAX_LOGIN_ATTEMPTS=${MAX_LOGIN_ATTEMPTS:-5}
      - LOCKOUT_DURATION_MINUTES=${LOCKOUT_DURATION_MINUTES:-15}
      - MAX_FILE_SIZE_MB=${MAX_FILE_SIZE_MB:-15}
      - GITEA_URL=${GITEA_URL}
      - GITEA_TOKEN=${GITEA_TOKEN}
      - GITEA_ORG=${GITEA_ORG:-AegisSight}
      - USER1_USERNAME=${USER1_USERNAME:-user1}
      - USER1_PASSWORD=${USER1_PASSWORD:-changeme123}
      - USER1_DISPLAYNAME=${USER1_DISPLAYNAME:-Benutzer 1}
      - USER1_COLOR=${USER1_COLOR:-#00D4FF}
      - USER2_USERNAME=${USER2_USERNAME:-user2}
      - USER2_PASSWORD=${USER2_PASSWORD:-changeme456}
      - USER2_DISPLAYNAME=${USER2_DISPLAYNAME:-Benutzer 2}
      - USER2_COLOR=${USER2_COLOR:-#FF9500}
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 10s
