Prometheus is not working on local setup

I am trying to enable prometheus metrics endpoint but somehow it always shows us down. I saw the question How to setup prometheus metrics? and I made sure that ip and port are ok but it is still not coming up. My chirpstack-application-server.toml

# Metrics collection settings.
# Timezone
# The timezone is used for correctly aggregating the metrics (e.g. per hour,
# day or month).
# Example: "Europe/Amsterdam" or "Local" for the the system's local time zone.

  # Metrics stored in Prometheus.
  # These metrics expose information about the state of the ChirpStack Network Server
  # instance.
  # Enable Prometheus metrics endpoint.

  # The ip:port to bind the Prometheus metrics server to for serving the
  # metrics endpoint.

  # API timing histogram.
  # By setting this to true, the API request timing histogram will be enabled.
  # See also:

Here is my prometheus.yml file

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'chirpstack'
    scrape_interval: 5s
    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    - targets: ['localhost:8072']

Logs for application server seem to show that metrics server is up

chirpstack-application-server_1 | time=“2020-02-14T00:17:41Z” level=info msg=“metrics: starting prometheus metrics server” bind=“”

I am using docker-compose up to start the server. The target is showing down on prometheus console. Though app server on localhost:8080 is fine.

Got the problem. I had to expose port 8070 in the docker container. Modified docker-compose.yml and added port mapping 8070:8070. Now it is working.