Prometheus on portainer failing to deply

Hi team,

Trying to deploy prometheus on portainer.

However when deploying the stack, I see the following error:

caller=main.go:521 level=error msg="Error loading config (--config.file=/etc/prometheus/prometheus.yaml)" file=/etc/prometheus/prometheus.yaml err="read /etc/prometheus/prometheus.yaml: is a directory"

/tmp/prometheus.yaml

global:
  scrape_interval:     15s # By default, scrape targets every 15 seconds.

scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'
    # Override the global default and scrape targets from this job every 5 seconds.
    scrape_interval: 5s
    static_configs:
      - targets: ['localhost:9090']

docker compose

---
volumes:
  prometheus-data:
    driver: local
services:
  prometheus:
    image: docker.io/prom/prometheus:v2.51.2
    container_name: prometheus
    ports:
      - 9090:9090
    command: "--config.file=/etc/prometheus/prometheus.yaml"
    volumes:
      - /tmp/prometheus.yaml:/etc/prometheus/prometheus.yaml:ro
      - prometheus-data:/prometheus
    restart: unless-stopped

any ideas why this happens? and how to fix it?