version: 2
updates:
  # Track base image versions via .env.build
  - package-ecosystem: "docker"
    directory: "/"
    schedule:
      interval: "weekly"
    file-patterns:
      - ".env.build"
      - "node:*"  # Ensures Node.js images are correctly detected

  # Monitor OS package versions in Dockerfile (Debian/Alpine)
  - package-ecosystem: "gitsubmodule"  # Alternative method to track OS packages in Dockerfile
    directory: "/"
    schedule:
      interval: "weekly"
    labels:
      - "dependencies"
      - "os-packages"
    commit-message:
      prefix: "os"
      include: "scope"

  # Monitor Node.js dependencies from package.json
  # TODO: Uncomment below if we want to begin letting Dependabot monitor & open PRs for Node.js project dependencies
  # - package-ecosystem: "npm"
  #   directory: "/"
  #   schedule:
  #     interval: "weekly"
  #   labels:
  #     - "dependencies"
  #     - "npm"
  #   commit-message:
  #     prefix: "npm"
  #     include: "scope"

  # Monitor GitHub Actions dependencies
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "weekly"
    labels:
      - "dependencies"
      - "github-actions"
    commit-message:
      prefix: "actions"
      include: "scope"
