Skip to content

Docker Compose#

The quickest way to setup piveau metrics is with a Docker Compose file you can get here. This will start all metrics services and in addition a configured piveau-hub-repo and all external databases. You can use this as a blueprint for a production deployment.

Prerequisites#

  • Docker & Docker Compose
  • Git
  • curl

Run images#

Build and start everything with Docker Compose:

docker compose -f docker-compose-metrics.yml up

This may take a couple of minutes. Upon completion, you can check if all services are running, e.g piveau-hup-repo at http://localhost:8081 or piveau-metrics-cache at http://localhost:8185.

For usage refer to the User Guide.

Manual setup#

For a manual setup without the provided docker compose or to enable different behaviour, you can configure the services as follows:

piveau-hub-repo#

To enable the metrics pipeline to run after storing a dataset with piveau-hub-repo, you have to configure it by setting the environment variable PIVEAU_HUB_VALIDATOR to a JSOn object with the following fields. You can use the docker compose as example.

Variable Description Default Value
PIVEAU_HUB_VALIDATOR.enabled Enable the validation of datasets via the metrics service false
PIVEAU_HUB_VALIDATOR.metricsPipeName The name of the metrics pipe that is used metrics
PIVEAU_HUB_VALIDATOR.history If the old metrics metadata should be saved as history or overwritten. false

piveau-metrics-reporter#

Variable Description Default Value
API_KEY The APi key of the reporter
QUICKCHART_ADDRESS The adress of the quickchart service the reporter uses to create charts http://quickchart:3400/chart
CORS_DOMAINS Domains from which a frontend is allowed to access the reporter, if they are different than the one the piveau-metrics-reporter is accessed on. []
SCHEDULES Array of languages the reports are generated in and the schedule of their generation []

piveau-metrics-cache#

Variable Description Default Value
CACHE_APIKEY The APi key of the piveau-metrics-cache
MONGODB_CONNECTION The adress of the mongodb service piveau-metrics-cache uses to store aggregations mongodb://mongodb:27017
CORS_DOMAINS Domains from which a frontend is allowed to access piveau-metrics-cache, if they are different than the one the piveau-metrics-cache is accessed on. []
PIVEAU_TRIPLESTORE_CONFIG JSON object with configuration on how to access the triplestore
PIVEAU_TRIPLESTORE_CONFIG.address URL of the triplestore string
PIVEAU_TRIPLESTORE_CONFIG.data_endpoint Relative CRUD endpoint of the triplestore string
PIVEAU_TRIPLESTORE_CONFIG.query_endpoint Relative query endpoint of the triplestore string
PIVEAU_TRIPLESTORE_CONFIG.username Username for the triplestore string
PIVEAU_TRIPLESTORE_CONFIG.password Password for the triplestore string
PIVEAU_TRIPLESTORE_CONFIG.transferFormat Format to send to the triplestore string