Failing to load data from a server into a container network

I’m running a cluster inside a network where all my conections besides Prometheus are ocurring just fine

  node_app:
    build:
    container_name: node_app
    ports:
      - "127.0.0.1:7071:7070"
    networks:
      - elixir_network
    deploy:
      resources:
        limits:
          memory: 2GB
          cpus: "1"
    stdin_open: true
    tty: true

  elixir_app:
    build:
      context: ..
      dockerfile: Dockerfile
    depends_on:
      postis:
        condition: service_healthy
    container_name: elixir_app
    ports:
      - "4000:4000"
    volumes:
      - ../:/app
      - elixir_deps:/app/deps
      - elixir_build:/app/_build
    networks:
      - elixir_network
    deploy:
      resources:
    stdin_open: true
    tty: true

  postis:
    image: postgres
    container_name: postis
    environment:
    ports:
      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data
    networks:
      - elixir_network


  prometheus:
    image: prom/prometheus
    container_name: prometheus
    networks:
      - elixir_network
    volumes:
      - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
    ports:
      - "9090:9090"
    restart: unless-stopped

  grafana:
    image: grafana/grafana
    container_name: grafana
    ports:
      - "3000:3000"
    volumes:
      - grafana_data:/var/lib/grafana
    environment:
      - GF_SECURITY_ADMIN_USER=admin
      - GF_SECURITY_ADMIN_PASSWORD=x
    networks:
      - elixir_network

My elixirapp is able to connect to postgres via the “postis” namespace, and load grafana dashboards as well, but when I try to see the data, the prometheus are’nt collecting my metrics emitted by my elixir_app aplication. I can see the dashboards generated, but no data.
I can see that my metrics are being emmited through localhost:4000/metrics on the browser, here is my prometheus config file

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

scrape_configs:
  - job_name: 'prometheus'
    static_configs:
      - targets: ['localhost:9090']

  - job_name: 'phoenix_app'
    scrape_interval: 5s  # Override the global interval for this job
    static_configs:
      - targets: ['elixir_app:4000']

If I can see my metrics on the /metrics endpoint on the browser, and connect to postgres and grafana on my application internal through the network, probably is mething with the prom file, but I cant find the reason