Configuring grafana and pyroscope(phlare) with docker-compose

Hi. I try to integrate grafana phlare(pyroscope) into grafana as datasource.
Currently, all containers are wrapped-up container using docker-compose.

In local machine, it works fine.
pyroscope(phlare) datasource is integrated with grafana well.

But on cloud infrastrucrue, it does not work.

This is my configuration yaml file and docker-compose.yaml file

# grafana datasource configuration
apiVersion: 1

datasources:
  - name: Pyroscope
    type: phlare
    basicAuth: false
    editable: true
    access: proxy
    uid: phlare
    url: http://pyroscope:4040
    version: 1
    jsonData:
        minStep: '15s'
        backendType: 'pyroscope'
# pyroscope configuration
storage-path: "/var/lib/pyroscope"

retention: 360h # 15 days
exemplars-retention: 72h # 3 days

scrape-configs:
  job-name: pyroscope
  scrape-interval: 10s
  enabled-profiles: [cpu, mem]
# docker-compose.yaml file
version: "3.9"

services:
  grafana:
    image: grafana/grafana:latest
    hostname: "grafana"
    container_name: "grafana"
    ports:
      - "3000:3000"
    volumes:
      - ./grafana/grafana-datasource.yaml:/etc/grafana/provisioning/datasources/datasources.yaml
    environment:
      - GF_AUTH_ANONYMOUS_ENABLED=true
      - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
      - GF_AUTH_DISABLE_LOGIN_FORM=true
    networks:
      - pyroscope

  pyroscope:
    hostname: pyroscope
    container_name: pyroscope
    image: "pyroscope/pyroscope:latest"
    deploy:
      restart_policy:
        condition: on-failure
    ports:
      - "4040:4040"
    command:
      - "server"
    volumes:
      - ./grafana/pyroscope-local-config.yaml:/etc/pyroscope/server.yaml
    networks:
      - pyroscope

networks:
  pyroscope:
    name: pyroscope
    driver: bridge


Cloud infrastructure network configuration.


Running with this configuration and docker-compose.yaml file on local macine. It works well


But when I run at the cloud infrastructure, it does not integrated.


Pyroscope which deployed on cloud infrastrucrue works well.

  • This is my question on stackoverflow…